Stores a set of objects with weak references to them, allowing them to be garbage collected. Can be iterated over, unlike a WeakSet.

Hierarchy

  • WeakSet
    • IterableWeakSet

Constructors

Properties

Methods

Constructors

  • Parameters

    • Optional entries: Iterable<any> = []

      The initial entries.

    Returns IterableWeakSet

Properties

#map: any = ...

The backing iterable weak map.

Methods

  • Delete a value from the set.

    Parameters

    • value: any

      The value to delete.

    Returns boolean

  • Whether this set contains the given value.

    Parameters

    • value: any

      The value to test.

    Returns boolean

  • Enumerate the collection.

    Returns Generator<any, void, any>

  • Clear all values from the set.

    Returns void

  • Enumerate the values.

    Returns Generator<any, void, any>