Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Value

Index

Functions

Functions

from

  • from(value: any, annotations?: string[]): Value
  • Constructs a dom.Value from the provided Javascript value using the following type mappings:

    JS Type | dom.Value subclass

    null | dom.Null boolean | dom.Boolean number | dom.Integer or dom.Float BigInt | dom.Integer string | dom.String Decimal | dom.Decimal Date | dom.Timestamp Timestamp | dom.Timestamp Uint8Array | dom.Blob Array | dom.List Object | dom.Struct

    Other input types (including 'undefined') are not supported and will throw an Error.

    If the input type is an Array or Object, this method will also convert each nested javascript values into a dom.Value.

    Parameters

    • value: any

      A javascript value to convert into an Ion dom.Value.

    • Optional annotations: string[]

      An optional array of strings to associate with the newly created dom.Value. These annotations will NOT be associated with any nested dom.Values.

    Returns Value