Interface ReadonlyMap<K, V>
interface ReadonlyMap<K, V> {
size: number;
"[iterator]"(): MapIterator<[K, V]>;
entries(): MapIterator<[K, V]>;
forEach(
callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void,
thisArg?: any,
): void;
get(key: K): V;
has(key: K): boolean;
keys(): MapIterator<K>;
values(): MapIterator<V>;
}
size: number;
"[iterator]"(): MapIterator<[K, V]>;
entries(): MapIterator<[K, V]>;
forEach(
callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void,
thisArg?: any,
): void;
get(key: K): V;
has(key: K): boolean;
keys(): MapIterator<K>;
values(): MapIterator<V>;
}
Type Parameters
Methods
[iterator]
- "[iterator]"(): MapIterator<[K, V]>
Returns MapIterator<[K, V]>
entries
- entries(): MapIterator<[K, V]>
Returns an iterable of key, value pairs for every entry in the map.
Returns MapIterator<[K, V]>
forEach
- forEach(
callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void,
thisArg?: any,
): void Parameters
- callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void
Optional
thisArg: any
Returns void
get
has
keys
- keys(): MapIterator<K>
Returns an iterable of keys in the map
Returns MapIterator<K>
values
- values(): MapIterator<V>
Returns an iterable of values in the map
Returns MapIterator<V>
Returns an iterable of entries in the map.