Skip to content

TupleWithMaxLength

TupleWithMaxLength<T, MaxLength> = readonly T[] & object

Defined in: packages/isaacscript-common/src/types/TupleWithMaxLength.ts:8

Helper type that validates that a tuple does not have a length greater than N.

For example, TupleWithMaxLength<string, 3> will allow string tuples of size 0, 1, 2, or 3.

length: IRange<0, MaxLength>

T

MaxLength extends number