A mapping of generic keys to generic values.
get with a key that does not exist results in an error, because
undefined cannot be represented. Iterators are not implemented yet.
- new Map<
V>() Constructs a new map mapping keys of type
Kto values of type
i32readonly The current number of key-value pairs in this map.
voidClears the map, deleting all key-value pairs.
boolDeletes the key-value pair for the corresponding key. Returns
trueif the key did exist, otherwise
VGets the value corresponding to the specified key. Traps if the key does not exist because "not found" cannot be represented in all cases (use
boolTests if the specified key exists.
Array<K>Gets the keys contained in this map as an array, in insertion order. This is preliminary while iterators are not supported.
V): void Sets the value for the specified key. Creates a new key-value pair if the key did not exist.
Array<V>Gets the values contained in this map as an array, in insertion order. This is preliminary while iterators are not supported.
stringReturns a string representation of this map.