devtypes - v1.1.0
    Preparing search index...

    Type Alias TuplePrepend<T, V>

    TuplePrepend: [V, ...T]

    Prepend an element to the beginning of a tuple.

    Type Parameters

    • T extends readonly any[]

      Tuple type

    • V

      Element to prepend

    1.1.0

    Creates a new tuple type with the specified element added at the start.

    type Tup = [ number, string ];
    type Prepended = TuplePrepend< Tup, boolean >;
    // [ boolean, number, string ]