mathue
    Preparing search index...

    Type Alias TupleOf<Ele, Len, Tup>

    TupleOf: Tup["length"] extends Len ? Tup : TupleOf<Ele, Len, [...Tup, Ele]>

    Type Parameters

    • Ele
    • Len extends number
    • Tup extends Ele[] = []
    type NumberTuple2 = TupleOf<number, 2>; // [number, number]