Repeat
Generates a tuple type of length N
where each element is of type T
.
If N
is number[]
, it will generate a tuple for each number in the array.
Example
type Test = Repeat<'foo', 3>
// ['foo', 'foo', 'foo']
type Test = Repeat<'foo', [1, 2]>
// ['foo'] | ['foo', 'foo']