41. implement FindIndex<T, E>
Share
- accepted / - tried
Just like Array.prototype.findIndex(),
please implement FindIndex<T, E>
.
type A = [any, never, 1, '2', true]type B = FindIndex<A, 1> // 2type C = FindIndex<A, 3> // never
- accepted / - tried
Just like Array.prototype.findIndex(),
please implement FindIndex<T, E>
.
type A = [any, never, 1, '2', true]type B = FindIndex<A, 1> // 2type C = FindIndex<A, 3> // never