Skip to content

API documentation of Agoric SDK / Exports / @agoric/store / types / LegacyWeakMap

Interface: LegacyWeakMap<K, V> ​

@agoric/store.types.LegacyWeakMap

LegacyWeakMap is deprecated. Use WeakMapStore instead if possible.

Type parameters ​

Name
K
V

Table of contents ​

Properties ​

Properties ​

delete ​

• delete: (key: K) => void

Remove the key. Throws if not found.

Type declaration ​

▸ (key): void

Parameters ​
NameType
keyK
Returns ​

void

Defined in ​

packages/store/src/types.js:145


get ​

• get: (key: K) => V

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

Type declaration ​

▸ (key): V

Parameters ​
NameType
keyK
Returns ​

V

Defined in ​

packages/store/src/types.js:140


has ​

• has: (key: K) => boolean

Check if a key exists

Type declaration ​

▸ (key): boolean

Parameters ​
NameType
keyK
Returns ​

boolean

Defined in ​

packages/store/src/types.js:139


init ​

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

Initialize the key only if it doesn't already exist

Type declaration ​

▸ (key, value): void

Parameters ​
NameType
keyK
valueV
Returns ​

void

Defined in ​

packages/store/src/types.js:142


set ​

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

Set the key. Throws if not found.

Type declaration ​

▸ (key, value): void

Parameters ​
NameType
keyK
valueV
Returns ​

void

Defined in ​

packages/store/src/types.js:144