[Typescript] 107. Medium - FindIndex
Similar to Array.findIndex:
type FindIndex<T extends readonly any[], K, ACC extends unknown[] = []> = T extends readonly [infer F, ...infer RT]
? K extends F
? ACC['length']
: FindIndex<RT, K, [...ACC, unknown]>
: -1;