Skip to content

IReplacingSet

Defined in: packages/data/src/set/ireplacing-set.ts:9

The sibling of ISet carrying IReplacing: never throws or waits when a bounded set is full, replacing an existing item under its own policy (LRU/LFU/FIFO) instead of throwing, or skipping the incoming one.

T

readonly capacity: number

Defined in: packages/data/src/collection/ibounded.ts:17

The maximum number of elements the collection can hold.

Note: Infinity is not a legal value here — an unbounded type omits this mixin.

IReplacing.capacity


readonly overflowPolicy: ReplacementPolicy

Defined in: packages/data/src/collection/ireplacing.ts:25

The policy that determines which entry to replace when the collection exceeds its capacity.

IReplacing.overflowPolicy

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

ISet.[iterator]


add(item): readonly T[]

Defined in: packages/data/src/set/ireplacing-set.ts:16

Same as ISet.add, but never throws — returns the items displaced to make room (empty if nothing was displaced).

T

readonly T[]

ISet[“add”]

ISet.add


addAll(items): readonly T[]

Defined in: packages/data/src/set/ireplacing-set.ts:24

Same as ISet.addAll, but never throws — returns the items displaced to make room (empty if nothing was displaced).

Iterable<T>

readonly T[]

ISet.addAll

ISet.addAll


clear(): void

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

Removes all elements from the collection.

void

ISet.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

ISet.count


delete(item): boolean

Defined in: packages/data/src/set/iset.ts:23

T

boolean

ISet.delete


difference(other): ISet<T>

Defined in: packages/data/src/set/iset.ts:28

Iterable<T>

ISet<T>

ISet.difference


has(item): boolean

Defined in: packages/data/src/set/iset.ts:24

T

boolean

ISet.has


intersection(other): ISet<T>

Defined in: packages/data/src/set/iset.ts:27

Iterable<T>

ISet<T>

ISet.intersection


isDisjointFrom(other): boolean

Defined in: packages/data/src/set/iset.ts:32

Iterable<T>

boolean

ISet.isDisjointFrom


isSubsetOf(other): boolean

Defined in: packages/data/src/set/iset.ts:30

Iterable<T>

boolean

ISet.isSubsetOf


isSupersetOf(other): boolean

Defined in: packages/data/src/set/iset.ts:31

Iterable<T>

boolean

ISet.isSupersetOf


symmetricDifference(other): ISet<T>

Defined in: packages/data/src/set/iset.ts:29

Iterable<T>

ISet<T>

ISet.symmetricDifference


union(other): ISet<T>

Defined in: packages/data/src/set/iset.ts:26

Iterable<T>

ISet<T>

ISet.union