Defines a type predicate used to validate an unknown value and narrow its type to T when the predicate returns true.
T
true
Type identified by the predicate.
Value to evaluate.
true when the value satisfies the predicate and may be treated as type T; otherwise false.
false
Defines a type predicate used to validate an unknown value and narrow its type to
Twhen the predicate returnstrue.