Skip to content

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

Interface: WeakSetStore<K>

@agoric/store.types.WeakSetStore

Type parameters

NameType
Kextends Key & object = Key

Table of contents

Properties

Properties

add

add: (key: K) => void

Add the key to the set if it is not already there. Do nothing silently if already there. The key must be one allowed by this store. For example a scalar store only allows primitives and remotables.

Type declaration

▸ (key): void

Parameters
NameType
keyK
Returns

void

Defined in

packages/store/src/types.js:65


addAll

addAll: (keys: CopySet<K> | Iterable<K>) => void

Type declaration

▸ (keys): void

Parameters
NameType
keysCopySet<K> | Iterable<K>
Returns

void

Defined in

packages/store/src/types.js:70


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:69


has

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.

Type declaration

▸ (key): boolean

Parameters
NameType
keyK
Returns

boolean

Defined in

packages/store/src/types.js:62