Head<T>: T extends [infer R, ...(infer _)]
    ? R
    : never

Extracts the type info for the first item inside a tuple.

Type Parameters

  • T extends readonly unknown[]

Example

type Value = Head<[true, 1, '2']>;
// => true

Generated using TypeDoc