ts-data-forge
    Preparing search index...
    isInt: (a: number) => a is Int = is

    Type guard that checks if a value is an integer.

    Returns true if the value is any integer (positive, negative, or zero), with no fractional component. This includes 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.ok(isInt(5));
    assert.notOk(isInt(5.25));
    assert.ok(Int.is(-10));