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

Type Parameters

  • K
  • V

Properties

addAll: ((entries) => void)

Type declaration

    • (entries): void
    • Parameters

      • entries: CopyMap<any, Passable> | Iterable<[K, V]>

      Returns void

clear: ((keyPatt?, valuePatt?) => void)

Type declaration

    • (keyPatt?, valuePatt?): void
    • Parameters

      Returns void

delete: ((key) => void)

Remove the key. Throws if not found.

Type declaration

    • (key): void
    • Parameters

      • key: K

      Returns void

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

Type declaration

    • (keyPatt?, valuePatt?): Iterable<[K, V]>
    • Parameters

      Returns Iterable<[K, V]>

get: ((key) => V)

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

Type declaration

    • (key): V
    • Parameters

      • key: K

      Returns V

getSize: ((keyPatt?, valuePatt?) => number)

Type declaration

    • (keyPatt?, valuePatt?): number
    • Parameters

      Returns number

has: ((key) => 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

Type declaration

    • (key): boolean
    • Parameters

      • key: K

      Returns boolean

init: ((key, value) => 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.

Type declaration

    • (key, value): void
    • Parameters

      • key: K
      • value: V

      Returns void

keys: ((keyPatt?, valuePatt?) => Iterable<K>)

Type declaration

    • (keyPatt?, valuePatt?): Iterable<K>
    • Parameters

      Returns Iterable<K>

set: ((key, value) => void)

Set the key. Throws if not found.

Type declaration

    • (key, value): void
    • Parameters

      • key: K
      • value: V

      Returns void

snapshot: ((keyPatt?, valuePatt?) => CopyMap<any, Passable>)

Type declaration

    • (keyPatt?, valuePatt?): CopyMap<any, Passable>
    • Parameters

      Returns CopyMap<any, Passable>

values: ((keyPatt?, valuePatt?) => Iterable<V>)

Type declaration

    • (keyPatt?, valuePatt?): Iterable<V>
    • Parameters

      Returns Iterable<V>