predicate
Fluent, callable predicate combinators that preserve TypeScript type guards.
A Predicate<T, U> is:
- Callable as
(value: T) => value is U - Composable through
.and(),.or(), and.negate()
Ordinary boolean predicates are treated as narrowing to T, meaning they
do not narrow the input type by themselves. Composed predicates passed to
.and() / .or() may return any value; they are tested for truthiness.