interface MapStoreMethods<K, V> {
    addAll: ((entries: CopyMap<any, Passable> | Iterable<[K, V], any, any>) => void);
    clear: ((keyPatt?: Pattern, valuePatt?: Pattern) => void);
    delete: ((key: K) => void);
    entries: ((keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<[K, V], any, any>);
    get: ((key: K) => V);
    getSize: ((keyPatt?: Pattern, valuePatt?: Pattern) => number);
    has: ((key: K) => boolean);
    init: ((key: K, value: V) => void);
    keys: ((keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<K, any, any>);
    set: ((key: K, value: V) => void);
    snapshot: ((keyPatt?: Pattern, valuePatt?: Pattern) => CopyMap<any, Passable>);
    values: ((keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<V, any, any>);
}

Type Parameters

  • K
  • V

Properties

addAll: ((entries: CopyMap<any, Passable> | Iterable<[K, V], any, any>) => void)
clear: ((keyPatt?: Pattern, valuePatt?: Pattern) => void)
delete: ((key: K) => void)

Remove the key. Throws if not found.

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

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

getSize: ((keyPatt?: Pattern, valuePatt?: Pattern) => number)
has: ((key: K) => boolean)

Check if a key exists. The key can be any JavaScript value, though the answer will always be false for keys that cannot be found in this map

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

Initialize the key only if it doesn't already exist. The key must be one allowed by this store. For example a scalar store only allows primitives and remotables.

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

Set the key. Throws if not found.

snapshot: ((keyPatt?: Pattern, valuePatt?: Pattern) => CopyMap<any, Passable>)
values: ((keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<V, any, any>)