ts-data-forge
    Preparing search index...
    asFiniteNumber: <N extends number>(
        x: N,
    ) => number & { Finite: true; NaNValue: false } & Readonly<
        {
            "TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3": unknown;
        },
    > & N = castType

    Casts a number to a FiniteNumber branded type.

    This function validates that the input is finite (not NaN, Infinity, or -Infinity) and returns it with the FiniteNumber brand. This ensures type safety for operations that require finite numeric values.

    Type Declaration

      • <N extends number>(
            x: N,
        ): number & { Finite: true; NaNValue: false } & Readonly<
            {
                "TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3": unknown;
            },
        > & N
      • Type Parameters

        • N extends number

        Parameters

        Returns number & { Finite: true; NaNValue: false } & Readonly<
            {
                "TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3": unknown;
            },
        > & N

        The value as a FiniteNumber branded type

    If the value is NaN, Infinity, or -Infinity