ts-type-forge
    Preparing search index...
    POSITIVE_INFINITY: TSTypeForgeInternals_ExtendNumberBrand<
        IntersectBrand<InfiniteNumber, PositiveNumber>,
        never,
        "< 2^15" | "< 2^16" | "< 2^31" | "< 2^32",
    >

    Branded numeric type specifically for Number.POSITIVE_INFINITY.

    const isPosInfinity = (x: number): x is POSITIVE_INFINITY =>
    x === Number.POSITIVE_INFINITY;

    const handleLimit = (x: number): FiniteNumber | POSITIVE_INFINITY => {
    if (x > Number.MAX_VALUE) return Number.POSITIVE_INFINITY as POSITIVE_INFINITY;
    return x as FiniteNumber;
    };