Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class IterableWeakMap<K, V>

    Stores a map of objects with weak references to the keys, allowing them to be garbage collected. Both keys and values can be iterated over, unlike a WeakMap.

    Type Parameters

    • K extends WeakKey
    • V

    Hierarchy

    • WeakMap
      • IterableWeakMap
    Index

    Constructors

    • Type Parameters

      • K extends WeakKey
      • V

      Parameters

      • Optionalentries: Iterable<[K, V], undefined, unknown> = []

        The initial entries.

      Returns IterableWeakMap<K, V>

    Methods

    • Enumerate the entries.

      Returns Generator<[K, V], void, unknown>

    • Clear all values from the map.

      Returns void

    • Remove a key from the map.

      Parameters

      • key: K

        The key to remove.

      Returns boolean

    • Enumerate the entries.

      Returns Generator<[K, V], void, unknown>

    • Retrieve a value from the map.

      Parameters

      • key: K

        The value's key.

      Returns V | undefined

    • Enumerate the keys.

      Returns Generator<K, void, unknown>

    • Enumerate the values.

      Returns Generator<V, void, unknown>