ts-data-forge
    Preparing search index...

    Variable isUintConst

    isUint: (a: number) => a is NonNegativeInt = is

    Type guard that checks if a value is a non-negative integer.

    Returns true for a non-negative integer — a value with no fractional component, including values outside the safe integer range (unlike SafeInt).

    Type Declaration

      • (a: number): a is NonNegativeInt
      • Parameters

        • a: number

        Returns a is NonNegativeInt

        true if the value is a non-negative integer, false otherwise

    assert.isTrue(isUint(4));

    assert.isFalse(isUint(-1));

    assert.isTrue(Uint.is(0));