Skip to main content

NonNegativeInteger<T>

NonNegativeInteger<T> = NonNegative<Integer<T>>

Defined in: packages/react-querybuilder/src/types/type-fest/numeric.ts:211

A non-negative (0 <= x < ∞) number that is an integer. Equivalent to NonNegative<Integer<T>>.

You can't pass a bigint as they are already guaranteed to be integers, instead use NonNegative<T>.

Use-case: Validating and documenting parameters.

Type Parameters

Type Parameter
T extends number

See

  • NonNegative
  • Integer

Example

import type {NonNegativeInteger} from 'type-fest';

declare function setLength<T extends number>(length: NonNegativeInteger<T>): void;

caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.