From fc373df31fa1a48b5d6a6153b9e70f4c1360bf8a Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 26 Jun 2026 14:10:02 -0700 Subject: [PATCH 1/2] Fix TypeScript errors. --- Extension/.scripts/common.ts | 2 +- Extension/src/common.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Extension/.scripts/common.ts b/Extension/.scripts/common.ts index 29758c269..c40e94398 100644 --- a/Extension/.scripts/common.ts +++ b/Extension/.scripts/common.ts @@ -39,7 +39,7 @@ chdir($root); // dump unhandled async errors to the console and exit. process.on('unhandledRejection', (reason: any, _promise) => { - error(`${reason?.stack?.split(/\r?\n/).filter(l => !l.includes('node:internal') && !l.includes('node_modules')).join('\n')}`); + error(`${reason?.stack?.split(/\r?\n/).filter((l: string) => !l.includes('node:internal') && !l.includes('node_modules')).join('\n')}`); process.exit(1); }); diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 60a8ff72e..fa79b7100 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -14,12 +14,12 @@ import * as vscode from 'vscode'; import { DocumentFilter, Range } from 'vscode-languageclient'; import * as nls from 'vscode-nls'; import { TargetPopulation } from 'vscode-tas-client'; -import * as which from "which"; import { ManualPromise } from './Utility/Async/manualPromise'; import { isWindows } from './constants'; import { getOutputChannelLogger, showOutputChannel } from './logger'; import { PlatformInformation } from './platform'; import * as Telemetry from './telemetry'; +import which = require("which"); nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); const localize: nls.LocalizeFunc = nls.loadMessageBundle(); @@ -1528,7 +1528,7 @@ export interface ISshLocalForwardInfo { export function whichAsync(name: string, path?: string): Promise { return new Promise(resolve => { - which(name, path ? { path } : {}, (err, resolved) => { + which(name, path ? { path } : {}, (err: Error | null, resolved: string | undefined) => { if (err) { resolve(undefined); } else { From 564638c21645edb664da926415279194b8947adb Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 26 Jun 2026 15:07:29 -0700 Subject: [PATCH 2/2] Copilot review feedback. --- Extension/src/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/src/common.ts b/Extension/src/common.ts index fa79b7100..7bfda0ec8 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -19,7 +19,7 @@ import { isWindows } from './constants'; import { getOutputChannelLogger, showOutputChannel } from './logger'; import { PlatformInformation } from './platform'; import * as Telemetry from './telemetry'; -import which = require("which"); +import which = require('which'); nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); const localize: nls.LocalizeFunc = nls.loadMessageBundle();