src/types/tuples.ts
export type Tail<T extends any[]> = ((...t: T) => any) extends (
_: any,
...tail: infer U
) => any
? U
: [];
export type Tail<T extends any[]> = ((...t: T) => any) extends (
_: any,
...tail: infer U
) => any
? U
: [];