A non-negative number/bigint (0 <= x < ∞).
number
bigint
0 <= x < ∞
Use-case: Validating and documenting parameters.
import type {NonNegative} from 'type-fest';declare function setLength<T extends number>(length: NonNegative<T>): void; Copy
import type {NonNegative} from 'type-fest';declare function setLength<T extends number>(length: NonNegative<T>): void;
A non-negative
number/bigint(0 <= x < ∞).Use-case: Validating and documenting parameters.