Function: find()
Call Signature
Section titled “Call Signature”find<
T,S>(source,predicate):S|undefined
Same semantics as Array.prototype.find, over a single Container.
Consumes elements until a match. A type guard narrows the return type.
Type Parameters
Section titled “Type Parameters”T
S
Parameters
Section titled “Parameters”source
Section titled “source”Source<T>
predicate
Section titled “predicate”(value, index) => value is S
Returns
Section titled “Returns”S | undefined
Call Signature
Section titled “Call Signature”find<
T>(source,predicate):T|undefined
Same semantics as Array.prototype.find, over a single Container.
Consumes elements until a match. A type guard narrows the return type.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”source
Section titled “source”Source<T>
predicate
Section titled “predicate”(value, index) => boolean
Returns
Section titled “Returns”T | undefined