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

Negation of type checks #334

Description

@hastebrot

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions