* Returns an iterator of all distinct keys in the map, in insertion order. * * Mutating the map during iteration is not supported and may skip or repeat * keys. * * @experimental **UNSTABLE**: New API, yet to be vetted. * * @returns An iterator of keys. * * @example Usage
()
| 558 | * ``` |
| 559 | */ |
| 560 | keys(): IterableIterator<K> { |
| 561 | // Delegates to the underlying `Map.prototype.keys()` (a native |
| 562 | // `MapIterator`); no per-bucket work is needed, so wrapping it in a |
| 563 | // hand-rolled iterator would be pure overhead. |
| 564 | return this.#map.keys(); |
| 565 | } |
| 566 | |
| 567 | /** |
| 568 | * Returns an iterator of all individual values across all keys, in insertion |
no outgoing calls