ts-type-forge
    Preparing search index...

    Type Alias Int32

    Int32: TSTypeForgeInternals_ExtendNumberBrand<
        SafeInt,
        "< 2^31"
        | "< 2^32"
        | "> -2^32"
        | ">= -2^31",
    >

    Branded numeric type for 32-bit signed integers. Range: [-2^31, 2^31 - 1] or [-2,147,483,648, 2,147,483,647]

    const isInt32 = (x: number): x is Int32 =>
    Number.isSafeInteger(x) && x >= -(2**31) && x <= 2**31 - 1;

    const toInt32 = (x: number): Int32 => {
    // Simulate 32-bit integer overflow
    return (x | 0) as Int32;
    };

    const bitwiseOr = (a: Int32, b: Int32): Int32 => (a | b) as Int32;