the IndexedSet element type
Optional values: Iterable<T>optional Iterable of values for initialization
Private Readonly #valuesSet[Symbol.toStringTag]
Set.size
Set[Symbol.iterator]
Set.add
Deletes the element at the given index.
Remove value at index 1
const indexedSet = new IndexedSet([1, 2, 3]);
indexedSet.deleteAt(1);
console.log([...indexedSet.values()]); // [1, 3]
true if the IndexedSet was modified, otherwise false
the index to delete
Optional deleteCount: numberSet.entries
Set.keys
Sets the value at the specified index. If the value already exists, it
will be moved to the new index, otherwise it will be inserted at the index.
Set value
const indexedSet = new IndexedSet([1, 2, 3]);
indexedSet.set(0, 3);
console.log([...indexedSet.values()]); // [3, 1, 2]
the index where to set the value
the value to set
Set.values
Generated using TypeDoc
A Set implementation that provides index-based access.
Similar to an Array that only allows unique elements.
Example