Skip to content

IMultimap

Defined in: packages/data/src/multimap/imultimap.ts:12

A key-to-many-values association.

count() (inherited from ICollection) is the total number of (key, value) entries across every key — a key with three values contributes three to count(), not one. keyCount() is the number of distinct keys, and keys() yields each of them once (a “key set”, not a (key, value) count-many repetition).

K

V

[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]


add(key, value): void

Defined in: packages/data/src/multimap/imultimap.ts:14

K

V

void


addAll(key, values): void

Defined in: packages/data/src/multimap/imultimap.ts:20

Takes an Iterable so another key’s values can be added without materialising them.

K

Iterable<V>

void


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


countFor(key): number

Defined in: packages/data/src/multimap/imultimap.ts:26

K

number


delete(key): number

Defined in: packages/data/src/multimap/imultimap.ts:24

K

number


deleteEntry(key, value): boolean

Defined in: packages/data/src/multimap/imultimap.ts:25

K

V

boolean


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

Defined in: packages/data/src/multimap/imultimap.ts:29

IterableIterator<readonly [K, V]>


get(key): IterableIterator<V>

Defined in: packages/data/src/multimap/imultimap.ts:13

K

IterableIterator<V>


has(key): boolean

Defined in: packages/data/src/multimap/imultimap.ts:22

K

boolean


hasEntry(key, value): boolean

Defined in: packages/data/src/multimap/imultimap.ts:23

K

V

boolean


keyCount(): number

Defined in: packages/data/src/multimap/imultimap.ts:27

number


keys(): IterableIterator<K>

Defined in: packages/data/src/multimap/imultimap.ts:28

IterableIterator<K>