devtypes - v2.0.0
    Preparing search index...

    Type Alias TupleHead<T>

    TupleHead: T extends readonly [infer H, ...any[]] ? H : never

    Get the first element of a tuple.

    Type Parameters

    • T extends readonly any[]

      Tuple type

    Extracts the type of the first element from a tuple type.

    type H = TupleHead< [ number, string, boolean ] >;  // number