package js.lib
Available on js
The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced. The keys must be objects and the values can be arbitrary values.
You can learn more about WeakMaps in the section WeakMap object in Keyed collections.
Documentation WeakMap by Mozilla Contributors, licensed under CC-BY-SA 2.5.
staticfinalread onlylength:IntThe value of the length property is 0.
new(?iterable:Any)If an iterable object is passed, all of its elements will be added to the new WeakSet. null is treated as undefined.
delete(key:{}):BoolRemoves any value associated to the key. has(key) will return false afterwards.
get(key:{}):TReturns the value associated to the key, or undefined if there is none.
has(key:{}):BoolReturns a Boolean asserting whether a value has been associated to the key in the WeakMap object or not.
set(key:{}, value:T):WeakMap<T>Sets the value for the key in the WeakMap object. Returns the WeakMap object.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/lib/WeakMap.html