type-challenges / type-challenges

Collection of TypeScript type challenges with online judge

Home Page:https://tsch.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

15 - Last of Array

Flavour86 opened this issue · comments

type Last<T extends any[]> = T extends [infer F, ...infer Rest] ? Rest[number] extends never ? F : Last<Rest> : never