Type alias Tuple<T, N>

Tuple<T, N>: N extends N ? number extends N ? T[] : _TupleOf<T, N, []> : never

Creates a tuple of type T and length N.

Example

type Pair<T> = Tuple<T, 2>;

Type Parameters

  • T

    the type of the tuple elements

  • N extends number

    the number of elements in the tuple

Generated using TypeDoc