Predicate
Predicate<
A> = (a) =>boolean
Defined in: Core/Predicate.ts:29
A boolean-valued function over a type A.
A Predicate<A> is the simpler sibling of Refinement<A, B>: it tests whether a
value satisfies a condition at runtime but carries no compile-time narrowing guarantee.
Use it when you need to combine, negate, or adapt boolean checks as first-class values
and do not require the extra type information that a Refinement provides.
Every Refinement<A, B> is a Predicate<A> — convert with Predicate.fromRefinement
when you want to compose a narrowing check alongside plain predicates.
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”A
Returns
Section titled “Returns”boolean