Skip to content

TupleWithLengthBetween

TupleWithLengthBetween<T, MinLength, MaxLength> = readonly T[] & object

Defined in: packages/isaacscript-common/src/types/TupleWithLengthBetween.ts:9

Helper type that validates that a tuple has a length between MinLength and MaxLength (inclusive on both ends).

For example, TupleWithLengthBetween<string, 2, 4> will allow string tuples of size 2, 3, or 4.

length: IRange<MinLength, MaxLength>

T

MinLength extends number

MaxLength extends number