Interface IObservableMap<T>

A map which can be observed for changes.

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

Type Parameters

  • T

Hierarchy (view full)

Implemented by


A signal emitted when the map has changed.

isDisposed: boolean

Test whether the object has been disposed.


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.


  • Remove a key from the map


    • key: string

      the key to remove.

    Returns undefined | T

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

  • Set a key-value pair in the map


    • key: string

      The key to set.

    • value: T

      The value for the key.

    Returns undefined | T

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