Interface PrimitiveInstance<T>

PrimitiveInstance represents a snapshot of a primitive value (string, number, boolean, JSON-serializable object or array, or binary data) that was stored at a key within a collection type.

Type Parameters

Hierarchy

  • PrimitiveInstance

Methods

  • Get a JavaScript object representation of the primitive value. This is an alias for calling value().

    If the underlying instance's value is not of the expected type at runtime, returns undefined.

    Returns undefined | CompactedValue<T>

  • Get a JSON-serializable representation of the primitive value. Binary values are converted to base64-encoded strings.

    If the underlying instance's value is not of the expected type at runtime, returns undefined.

    Returns undefined | CompactedJsonValue<T>

  • Get the primitive value represented by this instance. This reflects the value at the corresponding key in the collection at the time this instance was obtained.

    If the underlying instance at runtime is not a primitive value, returns undefined.

    Returns undefined | T

Generated using TypeDoc