Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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;

§Type Parameters

§
X extends readonly any[]
[src]

§Type

§
((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never
[src]