|
6 | 6 | import { CancellationToken } from 'vs/base/common/cancellation'; |
7 | 7 | import { Emitter, Event } from 'vs/base/common/event'; |
8 | 8 | import { Disposable, DisposableStore, dispose, IDisposable } from 'vs/base/common/lifecycle'; |
9 | | -import { keys } from 'vs/base/common/map'; |
10 | 9 | import { URI, UriComponents } from 'vs/base/common/uri'; |
11 | 10 | import { generateUuid } from 'vs/base/common/uuid'; |
12 | 11 | import { IRange } from 'vs/editor/common/core/range'; |
@@ -284,7 +283,7 @@ export class MainThreadCommentController { |
284 | 283 |
|
285 | 284 | async getDocumentComments(resource: URI, token: CancellationToken) { |
286 | 285 | let ret: modes.CommentThread[] = []; |
287 | | - for (let thread of keys(this._threads)) { |
| 286 | + for (let thread of [...this._threads.keys()]) { |
288 | 287 | const commentThread = this._threads.get(thread)!; |
289 | 288 | if (commentThread.resource === resource.toString()) { |
290 | 289 | ret.push(commentThread); |
@@ -315,7 +314,7 @@ export class MainThreadCommentController { |
315 | 314 |
|
316 | 315 | getAllComments(): MainThreadCommentThread[] { |
317 | 316 | let ret: MainThreadCommentThread[] = []; |
318 | | - for (let thread of keys(this._threads)) { |
| 317 | + for (let thread of [...this._threads.keys()]) { |
319 | 318 | ret.push(this._threads.get(thread)!); |
320 | 319 | } |
321 | 320 |
|
@@ -486,7 +485,7 @@ export class MainThreadComments extends Disposable implements MainThreadComments |
486 | 485 | if (!commentsPanelAlreadyConstructed && !this._openViewListener) { |
487 | 486 | this._openViewListener = this._viewsService.onDidChangeViewVisibility(e => { |
488 | 487 | if (e.id === COMMENTS_VIEW_ID && e.visible) { |
489 | | - keys(this._commentControllers).forEach(handle => { |
| 488 | + [...this._commentControllers.keys()].forEach(handle => { |
490 | 489 | let threads = this._commentControllers.get(handle)!.getAllComments(); |
491 | 490 |
|
492 | 491 | if (threads.length) { |
|
0 commit comments