Interface TypePredicate<T>

Defines a type predicate used to validate an unknown value and narrow its type to T when the predicate returns true.

Type Parameters

  • T

    Type identified by the predicate.

  • Parameters

    • value: unknown

      Value to evaluate.

    Returns value is T

    true when the value satisfies the predicate and may be treated as type T; otherwise false.