🦴 utilities
Gets the last type in the array or tuple that matches the Criteria.
Criteria
If the Criteria is not met, it will return `never'.
For Array<T>, it will return T | undefined if T satisfies Criteria.
Array<T>
T | undefined
T
ArrayPlus.Find<Array<1 | 2 | 'x'>, number> // 1 | 2 | undefinedArrayPlus.Find<[true, 123, 'x', 321], number> // 321 Copy
ArrayPlus.Find<Array<1 | 2 | 'x'>, number> // 1 | 2 | undefinedArrayPlus.Find<[true, 123, 'x', 321], number> // 321
🦴 utilities
Gets the last type in the array or tuple that matches the
Criteria
.If the
Criteria
is not met, it will return `never'.For
Array<T>
, it will returnT | undefined
ifT
satisfiesCriteria
.