Home > types > NonNegative
A non-negative number
/bigint
(0 <= x < ∞
).
Use-case: Validating and documenting parameters.
Signature:
export declare type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : never;
References: Negative
``` import {NonNegative} from ‘type-fest’;
declare function setLength<T extends number>(length: NonNegative
Utilities