interface WeakMapStore {
    addAll: ((entries) => void);
    delete: ((key) => void);
    get: ((key) => V);
    has: ((key) => boolean);
    init: ((key, value) => void);
    set: ((key, value) => void);
}

Type Parameters

Properties

addAll: ((entries) => void)

Type declaration

    • (entries): void
    • Parameters

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

      Returns void

delete: ((key) => void)

Type declaration

    • (key): void
    • Remove the key. Throws if not found.

      Parameters

      • key: K

      Returns void

get: ((key) => V)

Type declaration

    • (key): V
    • Return a value for the key. Throws if not found.

      Parameters

      • key: K

      Returns V

has: ((key) => boolean)

Type declaration

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

      Parameters

      • key: K

      Returns boolean

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

Type declaration

    • (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.

      Parameters

      • key: K
      • value: V

      Returns void

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

Type declaration

    • (key, value): void
    • Set the key. Throws if not found.

      Parameters

      • key: K
      • value: V

      Returns void

Generated using TypeDoc