342
343
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: unknown): void {
344
>
const state = this._state;
map.ts
345
>
let current = this._head;
346
>
while (current) {
347
>
if (thisArg) {
348
callbackfn.bind(thisArg)(current.value, current.key, this);
350
>
callbackfn(current.value, current.key, this);
351
>
}
352
>
if (this._state !== state) {
353
throw new Error(`LinkedMap got modified during iteration.`);
354
}
355
>
current = current.next;
map.ts
356
>
}
357
>
}
358
359
keys(): MapIterator<K> {