LegacyMap is deprecated. Use MapStore instead if possible.

interface LegacyMap<K, V> {
    clear: (() => void);
    delete: ((key: K) => void);
    entries: (() => Iterable<[K, V], any, any>);
    get: ((key: K) => V);
    getSize: (() => number);
    has: ((key: K) => boolean);
    init: ((key: K, value: V) => void);
    keys: (() => Iterable<K, any, any>);
    set: ((key: K, value: V) => void);
    values: (() => Iterable<V, any, any>);
}

Type Parameters

  • K
  • V

Properties

clear: (() => void)
delete: ((key: K) => void)

Remove the key. Throws if not found.

entries: (() => Iterable<[K, V], any, any>)
get: ((key: K) => V)

Return a value for the key. Throws if not found.

getSize: (() => number)
has: ((key: K) => boolean)

Check if a key exists

init: ((key: K, value: V) => void)

Initialize the key only if it doesn't already exist

keys: (() => Iterable<K, any, any>)
set: ((key: K, value: V) => void)

Set the key. Throws if not found.

values: (() => Iterable<V, any, any>)