Provides common conversion and validation logic needed to instantiate subclasses of dom.Value
any) and an optional annotations array.
If the value matches any of the above descriptions, the provided constructor will be invoked with the value; otherwise, throws an Error.
Constructors are expected to be compatible with the signature:
constructor(value, annotations: string): ClassName
See also: Value._fromJsValue()
Primitive types that will be passed through as-is.
Boxed primitive types that will be converted to primitives via
valueOf() and then passed through.
Classes that will be passed through as-is.
Invokes the provided constructor if
jsValue is of a supported data type; otherwise
throws an Error.
A dom.Value subclass's constructor to call.
An optional array of strings to associate with the newly constructed dom.Value.