Interface IObservableJSON

An observable JSON value.

interface IObservableJSON {
    changed: ISignal<IObservableJSON, IObservableMap.IChangedArgs<undefined | ReadonlyPartialJSONValue>>;
    isDisposed: boolean;
    size: number;
    type: "Map";
    clear(): void;
    delete(key): undefined | ReadonlyPartialJSONValue;
    dispose(): void;
    get(key): undefined | ReadonlyPartialJSONValue;
    has(key): boolean;
    keys(): string[];
    set(key, value): undefined | ReadonlyPartialJSONValue;
    toJSON(): PartialJSONObject;
    values(): (undefined | ReadonlyPartialJSONValue)[];
}

Hierarchy (view full)

Properties

changed: ISignal<IObservableJSON, IObservableMap.IChangedArgs<undefined | 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 a key-value pair in the map

    Parameters

    • key: string

      The key to set.

    • value: undefined | ReadonlyPartialJSONValue

      The value for the key.

    Returns undefined | ReadonlyPartialJSONValue

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