Type alias Tuple<Type, Size>

Tuple<Type, Size>: Size extends Size
    ? number extends Size
        ? Type[]
        : _TupleOf<Type, Size, []>
    : never

Create tuple of Type type with Size size

Type Parameters

  • Type

    Type of tuple

  • Size extends number

    Size of tuple

Returns

Tuple of Type type with Size size

Example

type Result = Tuple<string, 2>
// ^? type Result = [string, string]

Generated using TypeDoc