Decrement
Type Aliases
Decrement
Ƭ Decrement<N
>: Arr
<N
> extends [unknown
, ...(infer U)] ? U
["length"
] : never
Helper type to subtract one from a number type.
From: https://stackoverflow.com/questions/54243431/typescript-increment-number-type
Type parameters
Name | Type |
---|---|
N | extends number |