Optional
entries: Iterable<[any, any]> = []The initial entries.
Private
#refsA set of weak refs to the map's keys, allowing enumeration.
Private
#finalizerA FinalizationRegistry instance to clean up the ref set when objects are garbage collected.
Place a value in the map.
The key.
The value.
Static
Private
#cleanupClean up the corresponding ref in the set when its value is garbage collected.
The value held by the finalizer.
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.