On this page

Source Code: lib/util/LazySet.js#L57

Like Set but with an addAll method to eventually add items from another iterable. Access methods make sure that all delayed operations are executed. Iteration methods deopts to normal Set performance until clear is called again (because of the chance of modifications during iteration).

new LazySet(iterable?): LazySet<T>
Source Code: lib/util/LazySet.js#L63
Attributes
iterable:Iterable<T, any, any>
Returns:LazySet<T>

Seeds the set with an optional iterable while preparing internal queues for deferred merges.

Source Code: lib/util/LazySet.js#L110
Type:number

Returns the number of items after applying any deferred merges.

Returns:SetIterator<T>

Returns the default iterator over values after forcing pending merges.

lazySet.add(item): LazySet<T>
Source Code: lib/util/LazySet.js#L120
Attributes
item:T
Returns:LazySet<T>

Adds a single item immediately to the concrete backing set.

lazySet.addAll(iterable): LazySet<T>
Source Code: lib/util/LazySet.js#L131
Attributes
iterable:LazySet<T> | Iterable<T, any, any>
Returns:LazySet<T>

Queues another iterable or lazy set for later merging so large bulk adds can stay cheap until the set is read.

lazySet.clear(): void
Source Code: lib/util/LazySet.js#L157

Removes all items and clears every deferred merge queue.

lazySet.delete(value): boolean
Source Code: lib/util/LazySet.js#L171
Attributes
value:T
Returns:boolean

Deletes an item after first materializing any deferred additions that may contain it.

lazySet.entries(): SetIterator<[T, T]>
Source Code: lib/util/LazySet.js#L181
Returns:SetIterator<[T, T]>

Returns the set's entry iterator and permanently switches future operations to eager merge mode to preserve iterator correctness.

lazySet.forEach(callbackFn, thisArg): void
Source Code: lib/util/LazySet.js#L195
Attributes
callbackFn:(value: T, value2: T, set: Set<T>) => void
thisArg:K

Iterates over every item after forcing pending merges and switching to eager mode for correctness during iteration.

lazySet.has(item): boolean
Source Code: lib/util/LazySet.js#L207
Attributes
item:T
Returns:boolean

Checks whether an item is present after applying any deferred merges.

lazySet.keys(): SetIterator<T>
Source Code: lib/util/LazySet.js#L216
Returns:SetIterator<T>

Returns the key iterator, eagerly materializing pending merges first.

lazySet.serialize(__namedParameters): void
Source Code: lib/util/LazySet.js#L252
Attributes

Serializes the fully materialized set contents into webpack's object serialization stream.

lazySet.values(): SetIterator<T>
Source Code: lib/util/LazySet.js#L226
Returns:SetIterator<T>

Returns the value iterator, eagerly materializing pending merges first.

LazySet.deserialize(__namedParameters): LazySet<T>
Source Code: lib/util/LazySet.js#L264
Attributes

Restores a LazySet from serialized item data.