TupleWithLengthBetween
Type Aliases
TupleWithLengthBetween
Ƭ TupleWithLengthBetween<T
, MinLength
, MaxLength
>: readonly T
[] & { length
: IRange
<MinLength
, MaxLength
> }
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.
Type parameters
Name | Type |
---|---|
T | T |
MinLength | extends number |
MaxLength | extends number |
Defined in
packages/isaacscript-common/src/types/TupleWithLengthBetween.ts:9