• Unsafe constructor for arbitrary precision numeric values.

    This uses decimal function underneath and throws a NumericError if the given value could not be converted into a valid arbitrary precision numeric value.

    The usage is recommended only if call-site knows that the given argument is a value that can be safely converted into a valid arbitrary precision number.

    Parameters

    • x: string | number

      A value to convert to :class.

    Returns Decimal

    A finite :class value.

    Throws

    NumericError if given argument is not a valid, finite numeric value.

Generated using TypeDoc