Skip to content

ICollection

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

Interface representing a collection of elements.

Throughout this hierarchy undefined means “there is no element” — it is what get, front, back, peek, top, root, shift, pop, dequeue and extract return when there is nothing to return. Elements therefore cannot be undefined themselves, which DefinedValue enforces. Use null for an element that means nothing.

  • Iterable<T>

T

The type of elements in the collection. Anything except undefined.

[iterator](): Iterator<T, any, any>

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

Iterator<T, any, any>

Iterable.[iterator]


clear(): void

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

Removes all elements from the collection.

void


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