Predicate
The Predicate module provides utilities for type-safe predicate functions in TypeScript.
not
Returns a new function that will return the opposite boolean value of the original predicate.
Predicate<A>
Represents a function that tests a value and returns a boolean.
Guard<A, B extends A>
Represents a type guard function that refines a type A
to a more specific type B
.
Guarded<Guard>
Utility type that extracts the refined type B
from a Guard<A, B>
.
Unguarded<A, B extends A>
Utility type that computes the type that was excluded by the type guard refinement.
Last updated
Was this helpful?