interface WeakMapStore<K, V> {
    addAll: ((entries: CopyMap<any, any> | Iterable<[K, V], any, any>) => void);
    delete: ((key: K) => void);
    get: ((key: K) => V);
    has: ((key: K) => boolean);
    init: ((key: K, value: V) => void);
    set: ((key: K, value: V) => void);
}

Type Parameters

  • K
  • V

Properties

addAll: ((entries: CopyMap<any, any> | Iterable<[K, V], any, any>) => void)
delete: ((key: K) => void)

Remove the key. Throws if not found.

get: ((key: K) => V)

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

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 store.

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.

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

Set the key. Throws if not found.