diff --git a/src/vs/workbench/api/browser/mainThreadComments.ts b/src/vs/workbench/api/browser/mainThreadComments.ts index 79dbfca1f18..fad1a18c266 100644 --- a/src/vs/workbench/api/browser/mainThreadComments.ts +++ b/src/vs/workbench/api/browser/mainThreadComments.ts @@ -6,7 +6,6 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { Emitter, Event } from 'vs/base/common/event'; import { Disposable, DisposableStore, dispose, IDisposable } from 'vs/base/common/lifecycle'; -import { keys } from 'vs/base/common/map'; import { URI, UriComponents } from 'vs/base/common/uri'; import { generateUuid } from 'vs/base/common/uuid'; import { IRange } from 'vs/editor/common/core/range'; @@ -284,7 +283,7 @@ export class MainThreadCommentController { async getDocumentComments(resource: URI, token: CancellationToken) { let ret: modes.CommentThread[] = []; - for (let thread of keys(this._threads)) { + for (let thread of [...this._threads.keys()]) { const commentThread = this._threads.get(thread)!; if (commentThread.resource === resource.toString()) { ret.push(commentThread); @@ -315,7 +314,7 @@ export class MainThreadCommentController { getAllComments(): MainThreadCommentThread[] { let ret: MainThreadCommentThread[] = []; - for (let thread of keys(this._threads)) { + for (let thread of [...this._threads.keys()]) { ret.push(this._threads.get(thread)!); } @@ -486,7 +485,7 @@ export class MainThreadComments extends Disposable implements MainThreadComments if (!commentsPanelAlreadyConstructed && !this._openViewListener) { this._openViewListener = this._viewsService.onDidChangeViewVisibility(e => { if (e.id === COMMENTS_VIEW_ID && e.visible) { - keys(this._commentControllers).forEach(handle => { + [...this._commentControllers.keys()].forEach(handle => { let threads = this._commentControllers.get(handle)!.getAllComments(); if (threads.length) {