Function resolveByPredicate
-
Type Parameters
- T
Parameters
- predicate: TypePredicate<T>
Predicate used to evaluate each value.
- ...values: unknown[]
Values to evaluate in order.
Returns T
The first value accepted by the predicate; otherwise
undefined.
Resolves the first value accepted by the supplied predicate.
Values are evaluated in the order provided. The first value accepted by the predicate is returned. If no values are accepted,
undefinedis returned.