Function bigintFromJSON

  • Parses an integer value into a bigint from JSON-compatible value encoding separate from type inforation. Most use cases should use podValueFromJSON instead. This function is intended as a helper for other parsers with their own source of type information.

    Parameters

    • numericValue: string | number

      the encoded numeric value, which could be a number, or a stringified number

    • Optional nameForErrorMessages: string

      an optional name for this value to be used in error messages

    Returns bigint

    a bigint representing the number

    Throws

    TypeError if the input type or value are not validly formed

    Throws

    RangeError if a value is outside of the bounds

    Throws

    SyntaxError if a value is unparseable

Generated using TypeDoc