UNPKG

weakref

Version:

IterableWeakSet, IterableWeakMap, and WeakValueMap provide iterable weak collections whose entries disappear automatically when their objects are garbage collected—perfect for caches and registries in any JavaScript runtime.

18 lines • 693 B
export declare class WeakValueMap<K, V extends object> implements Map<K, V> { #private; constructor(entries?: readonly (readonly [K, V])[] | null); constructor(iterable: Iterable<readonly [K, V]>); get size(): number; clear(): void; delete(key: K): boolean; get(key: K): V | undefined; has(key: K): boolean; set(key: K, value: V): this; get [Symbol.toStringTag](): string; forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: unknown): void; [Symbol.iterator](): MapIterator<[K, V]>; entries(): MapIterator<[K, V]>; keys(): MapIterator<K>; values(): MapIterator<V>; } //# sourceMappingURL=weak_value_map.d.ts.map