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