Skip to content

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

Interface: LegacyMap<K, V>

@agoric/store.types.LegacyMap

LegacyMap is deprecated. Use MapStore instead if possible.

Type parameters

Name
K
V

Table of contents

Properties

Properties

clear

clear: () => void

Type declaration

▸ (): void

Returns

void

Defined in

packages/store/src/types.js:164


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


entries

entries: () => Iterable<[K, V]>

Type declaration

▸ (): Iterable<[K, V]>

Returns

Iterable<[K, V]>

Defined in

packages/store/src/types.js:162


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


getSize

getSize: () => number

Type declaration

▸ (): number

Returns

number

Defined in

packages/store/src/types.js:163


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


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


keys

keys: () => Iterable<K>

Type declaration

▸ (): Iterable<K>

Returns

Iterable<K>

Defined in

packages/store/src/types.js:160


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


values

values: () => Iterable<V>

Type declaration

▸ (): Iterable<V>

Returns

Iterable<V>

Defined in

packages/store/src/types.js:161