Skip to main content
Module

x/weakref/mod.ts>WeakValueMap

Weak Collection Library for Deno and Node.js.
Latest
class WeakValueMap
implements Map<K, V>
import { WeakValueMap } from "https://deno.land/x/weakref@0.2.0/mod.ts";

Constructors

new
WeakValueMap(entries?: readonly (readonly [K, V])[] | null)
new
WeakValueMap(iterable: Iterable<readonly [K, V]>)
new
WeakValueMap(iterable?: Iterable<readonly [K, V]> | null)

Type Parameters

K
V extends object

Properties

readonly
size: number
readonly
[Symbol.toStringTag]

Methods

clear(): void
delete(key: K): boolean
entries(): IterableIterator<[K, V]>
forEach(callbackfn: (
value: V,
key: K,
map: Map<K, V>,
) => void
, thisArg?: unknown
): void
get(key: K): V | undefined
has(key: K): boolean
keys(): IterableIterator<K>
set(key: K, value: V): this
values(): IterableIterator<V>
[Symbol.iterator](): IterableIterator<[K, V]>