devtypes - v1.1.0
    Preparing search index...

    Type Alias TupleToUnion<T>

    TupleToUnion: T[number]

    Convert a tuple or readonly array type to a union.

    Type Parameters

    • T extends readonly any[]

      Tuple or readonly array type

    Extracts the element types of a tuple or array and produces a union of those element types.

    type Tup = [ string, number, boolean ];
    type U = TupleToUnion< Tup >;
    // string | number | boolean