DEV Community


Discussion on: How 2 TypeScript: Get the last item type from a tuple of types

menocomp profile image
Mina Luke

Interesting I like the way you removed the first item from the tuple.
It can be simplified more by doing this:

type DropFirstInTuple<T extends any[]> = T extends [arg: any, infer U] ? U : T;
Enter fullscreen mode Exit fullscreen mode