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
- for
Each (callbackfn, thisArg?): void Parameters
- callbackfn: ((value: V, key: K, map: ReadonlyMap<K, V>) => void)
- (value, key, map): void
Parameters
- value: V
- key: K
- map: ReadonlyMap<K, V>
Returns void
Optional
thisArg: any
Returns void
- callbackfn: ((value: V, key: K, map: ReadonlyMap<K, V>) => void)
get
has
- has(key): boolean
Parameters
- key: K
Returns boolean
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.