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>Seeds the set with an optional iterable while preparing internal queues for deferred merges.
numberSetIterator<T>Returns the default iterator over values after forcing pending merges.
add
add(item): LazySet<T>TLazySet<T>Adds a single item immediately to the concrete backing set.
addAll(iterable): LazySet<T>Queues another iterable or lazy set for later merging so large bulk adds can stay cheap until the set is read.
clear(): voidvoidRemoves all items and clears every deferred merge queue.
delete(value): booleanTbooleanDeletes an item after first materializing any deferred additions that may contain it.
entries(): SetIterator<[T, T]>SetIterator<[T, T]>Returns the set's entry iterator and permanently switches future operations to eager merge mode to preserve iterator correctness.
forEach(callbackFn, thisArg): voidIterates over every item after forcing pending merges and switching to eager mode for correctness during iteration.
has
has(item): booleanTbooleanChecks whether an item is present after applying any deferred merges.
keys
keys(): SetIterator<T>SetIterator<T>Returns the key iterator, eagerly materializing pending merges first.
serialize(objectSerializerContext): voidObjectSerializerContextvoidSerializes the fully materialized set contents into webpack's object serialization stream.
values(): SetIterator<T>SetIterator<T>Returns the value iterator, eagerly materializing pending merges first.
ObjectDeserializerContextLazySet<T>Restores a LazySet from serialized item data.
voidIterator<T, TReturn, TNext>voidIteratorObject<T, TReturn, TNext>IteratorObject<T, undefined>voidSetIterator<T>