Function podValueFromTypedJSON

  • Parses a PODValue from JSON-compatible inputs which have already been parsed into separate type and value. 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

    • podValueType: string

      the type of PODValue expected

    • jsonRawValue: string | number

      the JSON-compatible encoding of the bare value with no type information

    • Optional nameForErrorMessages: string

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

    Returns PODValue

    a standard TypeScript POD value

    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