WeakMap
@Js
class WeakMap : Obj
WeakMap 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.
Sets value for given key in this map
Returns the value associated to the key, or null if there is none
Return true if key exists in this map
Removes any value associated to the key
Bool delete(Obj key)
Removes any value associated to the key. Returns true if an element has been removed successfully.
@Operator
Obj? get(Obj key)
Returns the value associated to the key, or null if there is none.
Bool has(Obj key)
Return true if key exists in this map.
@Operator
This set(Obj key, Obj val)
Sets value for given key in this map. Returns this.