Skip to main content

createPredicate

Callable

  • createPredicate<S, T>(schema: S): Predicate<T>

  • Create a reusable predicate from a schema that validates a value to return a boolean if no validation errors arise. If null or undefined is returned, will return false, regardless of nullable or undefinable state.


    Type parameters