API Reference
Explore the available functions and combinators. Use the sidebar to navigate.
define
Wrap a predicate as a typed guard.
equals
Value equality helpers: equals, equalsBy, equalsKey.
logic
Logical combinators: and, andAll, or, not, guardIn.
parse
Safe parsing with tagged results.
nullish
Nullability helpers: nullable, optional, required, nonNull.
primitive
Primitive guards: string, number, boolean, etc.
object
Object and built-in guards: array, date, map, set, …
predicate
Convert boolean predicates to refinements.
arrayOf
Guard arrays with an element guard.
tupleOf
Guard fixed-length tuples by position.
oneOf
Passes when any guard passes (union).
recordOf
Guard records with key and value guards.
struct
Shape guard for objects; supports exact key checking.
oneOfValues
Guard literal value sets with exact equality.