Interface IObservableJSON

An observable JSON value.

Hierarchy

Properties

changed: ISignal<IObservableJSON, IObservableMap.IChangedArgs<ReadonlyPartialJSONValue>>

A signal emitted when the map has changed.

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

size: number

The number of key-value pairs in the map.

type: "Map"

The type of the Observable.

Methods

  • Set the ObservableMap to an empty map.

    Returns void

  • Remove a key from the map

    Parameters

    • key: string

      the key to remove.

    Returns ReadonlyPartialJSONValue

    the value of the given key, or undefined if that does not exist.

  • Dispose of the resources held by the map.

    Returns void

  • Get a value for a given key.

    Parameters

    • key: string

      the key.

    Returns ReadonlyPartialJSONValue

    the value for that key.

  • Check whether the map has a key.

    Parameters

    • key: string

      the key to check.

    Returns boolean

    true if the map has the key, false otherwise.

  • Get a list of the keys in the map.

    Returns string[]

    • a list of keys.
  • Set a key-value pair in the map

    Parameters

    • key: string

      The key to set.

    • value: ReadonlyPartialJSONValue

      The value for the key.

    Returns ReadonlyPartialJSONValue

    the old value for the key, or undefined if that did not exist.

  • Serialize the model to JSON.

    Returns PartialJSONObject

  • Get a list of the values in the map.

    Returns ReadonlyPartialJSONValue[]

    • a list of values.

Generated using TypeDoc