Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Negation of type checks #334

Open
hastebrot opened this issue May 12, 2019 · 0 comments
Open

Negation of type checks #334

hastebrot opened this issue May 12, 2019 · 0 comments

Comments

@hastebrot
Copy link

To negate type checks I currently have to use t.refinement():

t.refinement(t.Nil, value => !t.Nil.is(value), "NotNil")(null)

Screenshot 2019-05-12 at 13 22 21

Would it make sense to add a t.negate() to refine type checkers with negation?

t.NotNil = t.negate(t.Nil, "NotNil")
t.NotNil(null)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant