Head
Extracts the head of a tuple.
If you declare Head<[A, B, C]>
you will get back A
.
type Head<X extends readonly any[]> = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never;
Extracts the head of a tuple.
If you declare Head<[A, B, C]>
you will get back A
.