ts-data-forge
    Preparing search index...

    Variable isIntConst

    isInt: (a: number) => a is Int = is

    Type guard that checks if a value is an integer.

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

    Type Declaration

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

        • a: number

        Returns a is Int

        true if the value is an integer, false otherwise

    assert.isTrue(isInt(5));

    assert.isFalse(isInt(5.25));

    assert.isTrue(Int.is(-10));