41. implement FindIndex<T, E>

TypeScript

  - 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

Let's try to solve this problem within 10 minutes.