diff --git a/src/tsconfig.monaco.json b/src/tsconfig.monaco.json index 6293f59ba2b..0fbd2240799 100644 --- a/src/tsconfig.monaco.json +++ b/src/tsconfig.monaco.json @@ -11,7 +11,7 @@ "moduleResolution": "nodenext", "removeComments": false, "preserveConstEnums": true, - "target": "ES2022", + "target": "ES2024", "sourceMap": false, "declaration": true, "skipLibCheck": true diff --git a/src/tsconfig.vscode-dts.json b/src/tsconfig.vscode-dts.json index 3df2c2292ef..b83f686e4f3 100644 --- a/src/tsconfig.vscode-dts.json +++ b/src/tsconfig.vscode-dts.json @@ -13,7 +13,7 @@ "forceConsistentCasingInFileNames": true, "types": [], "lib": [ - "ES2022" + "ES2024" ], }, "include": [ diff --git a/src/vs/workbench/contrib/chat/common/widget/annotations.ts b/src/vs/workbench/contrib/chat/common/widget/annotations.ts index c22c60ca430..df8564c6192 100644 --- a/src/vs/workbench/contrib/chat/common/widget/annotations.ts +++ b/src/vs/workbench/contrib/chat/common/widget/annotations.ts @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { findLastIdx } from '../../../../../base/common/arraysFind.js'; import { MarkdownString } from '../../../../../base/common/htmlContent.js'; import { basename } from '../../../../../base/common/resources.js'; import { URI } from '../../../../../base/common/uri.js'; @@ -18,7 +17,7 @@ export function annotateSpecialMarkdownContent(response: Iterable p.kind !== 'textEditGroup' && p.kind !== 'undoStop'); + const previousItemIndex = result.findLastIndex(p => p.kind !== 'textEditGroup' && p.kind !== 'undoStop'); const previousItem = result[previousItemIndex]; if (item.kind === 'inlineReference') { let label: string | undefined = item.name; diff --git a/src/vs/workbench/contrib/debug/common/debugModel.ts b/src/vs/workbench/contrib/debug/common/debugModel.ts index 8a468452695..9c943348a97 100644 --- a/src/vs/workbench/contrib/debug/common/debugModel.ts +++ b/src/vs/workbench/contrib/debug/common/debugModel.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import { distinct } from '../../../../base/common/arrays.js'; -import { findLastIdx } from '../../../../base/common/arraysFind.js'; import { DeferredPromise, RunOnceScheduler } from '../../../../base/common/async.js'; import { VSBuffer, decodeBase64, encodeBase64 } from '../../../../base/common/buffer.js'; import { CancellationTokenSource } from '../../../../base/common/cancellation.js'; @@ -1542,7 +1541,7 @@ export class DebugModel extends Disposable implements IDebugModel { let index = -1; if (session.parentSession) { // Make sure that child sessions are placed after the parent session - index = findLastIdx(this.sessions, s => s.parentSession === session.parentSession || s === session.parentSession); + index = this.sessions.findLastIndex(s => s.parentSession === session.parentSession || s === session.parentSession); } if (index >= 0) { this.sessions.splice(index + 1, 0, session); diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts index 3b26d58d13a..8b06a57a016 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts @@ -5,7 +5,6 @@ import * as nls from '../../../../../nls.js'; import * as DOM from '../../../../../base/browser/dom.js'; -import { findLastIdx } from '../../../../../base/common/arraysFind.js'; import { IStorageService } from '../../../../../platform/storage/common/storage.js'; import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js'; import { IThemeService, registerThemingParticipant } from '../../../../../platform/theme/common/themeService.js'; @@ -774,7 +773,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD this._list.reveal(prevChangeIndex); } else { // go to the last one - const index = findLastIdx(currentViewModels, vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder'); + const index = currentViewModels.findLastIndex(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder'); if (index >= 0) { this._list.setFocus([index]); this._list.reveal(index);