UNPKG

@jaenster/weakrefmap

Version:

WeakRefMap, a weak map with access to the fields, and keys can be primitives

17 lines (16 loc) 608 B
export declare class WeakRefMap<K, V extends object> implements Map<K, V> { #private; constructor(values?: readonly [K, V][]); set(key: K, value: V): this; get(key: K): V | undefined; readonly [Symbol.toStringTag]: string; get size(): number; [Symbol.iterator](): IterableIterator<[K, V]>; clear(): void; delete(key: K): boolean; entries(): IterableIterator<[K, V]>; forEach(fn: (value: V, key: K, map: WeakRefMap<K, V>) => void, thisArg?: any): void; has(key: K): boolean; keys(): IterableIterator<K>; values(): IterableIterator<V>; }