ts-type-forge
    Preparing search index...
    SafeInt: TSTypeForgeInternals_ExtendNumberBrand<Int, "SafeInt">

    Branded numeric type for safe integers. Represents integers that can be exactly represented in JavaScript (±2^53 - 1).

    const isSafeInt = (x: number): x is SafeInt => Number.isSafeInteger(x);

    const safeMath = {
    add: (a: SafeInt, b: SafeInt): SafeInt | undefined => {
    const result = a + b;
    return isSafeInt(result) ? result : undefined;
    }
    };