* Executes a callback function for each key-value pair in the map in sorted order * * @param callbackfn - Function to execute for each entry
(
callbackfn: (value: TValue, key: TKey, map: Map<TKey, TValue>) => void,
)
| 206 | * @param callbackfn - Function to execute for each entry |
| 207 | */ |
| 208 | forEach( |
| 209 | callbackfn: (value: TValue, key: TKey, map: Map<TKey, TValue>) => void, |
| 210 | ): void { |
| 211 | for (const key of this.sortedKeys) { |
| 212 | callbackfn(this.map.get(key)!, key, this.map) |
| 213 | } |
| 214 | } |
| 215 | } |