Skip to content

IMap

Defined in: packages/data/src/map/imap.ts:13

A key-to-value association.

count() (inherited from ICollection) is the number of entries, which for a map is the same number as the number of keys — a map cannot hold two entries for one key by definition, so no separate keyCount() is needed here (unlike IMultimap, where it can differ).

K

V extends DefinedValue

[iterator](): Iterator<readonly [K, V], any, any>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:47

Iterator<readonly [K, V], any, any>

ICollection.[iterator]


clear(): void

Defined in: packages/data/src/collection/icollection.ts:23

Removes all elements from the collection.

void

ICollection.clear


count(): number

Defined in: packages/data/src/collection/icollection.ts:20

The number of elements in the collection.

A method, not a getter: its async counterpart needs a round trip to the backing store, and a member must have the same shape in both.

number

ICollection.count


delete(key): boolean

Defined in: packages/data/src/map/imap.ts:19

K

boolean


entries(): IterableIterator<readonly [K, V]>

Defined in: packages/data/src/map/imap.ts:22

IterableIterator<readonly [K, V]>


get(key): V | undefined

Defined in: packages/data/src/map/imap.ts:16

K

V | undefined


has(key): boolean

Defined in: packages/data/src/map/imap.ts:18

K

boolean


keys(): IterableIterator<K>

Defined in: packages/data/src/map/imap.ts:20

IterableIterator<K>


set(key, value): void

Defined in: packages/data/src/map/imap.ts:17

K

V

void


values(): IterableIterator<V>

Defined in: packages/data/src/map/imap.ts:21

IterableIterator<V>