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
Name | Type |
---|---|
key | K |
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
Name | Type |
---|---|
key | K |
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
Name | Type |
---|---|
key | K |
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
Name | Type |
---|---|
key | K |
value | V |
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
Name | Type |
---|---|
key | K |
value | V |
Returns
void