383
384
values(): MapIterator<V> {
385
>
const map = this;
map.ts
386
>
const state = this._state;
387
>
let current = this._head;
388
>
const iterator: MapIterator<V> = {
389
>
[Symbol.iterator]() {
390
>
return iterator;
391
>
},
392
>
[Symbol.dispose]() { /* no-op */ },
393
>
next(): IteratorResult<V> {
394
>
if (map._state !== state) {
395
throw new Error(`LinkedMap got modified during iteration.`);
396
}
398
>
const result = { value: current.value, done: false };
399
>
current = current.next;
400
>
return result;
401
>
} else {
402
>
return { value: undefined, done: true };
403
>
}
404
>
}
405
>
};
406
>
return iterator;
407
>
}
408
409
entries(): MapIterator<[K, V]> {