NaturalNumbersLessThan
Type Aliases
NaturalNumbersLessThan
Ƭ NaturalNumbersLessThan<N
, Acc
>: Acc
["length"
] extends N
? Acc
[number
] : NaturalNumbersLessThan
<N
, [...Acc, Acc
["length"
]]>
Helper type to get a range of integers between 0 and N - 1.
From: https://stackoverflow.com/questions/39494689/is-it-possible-to-restrict-number-to-a-certain-range
Type parameters
Name | Type |
---|---|
N | extends number |
Acc | extends number [] = [] |
Defined in
packages/isaacscript-common/src/types/NaturalNumbersLessThan.ts:7