mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
Fix type error
This commit is contained in:
@@ -10,6 +10,7 @@ import { nulToken } from '../utils/cancellation';
|
||||
import { Command } from '../utils/commandManager';
|
||||
import { Lazy } from '../utils/lazy';
|
||||
import { isImplicitProjectConfigFile, openOrCreateConfigFile } from '../utils/tsconfig';
|
||||
import { ServerResponse } from '../typescriptService';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -68,13 +69,13 @@ async function goToProjectConfig(
|
||||
return;
|
||||
}
|
||||
|
||||
let res: protocol.ProjectInfoResponse | undefined;
|
||||
let res: ServerResponse<protocol.ProjectInfoResponse> | undefined;
|
||||
try {
|
||||
res = await client.execute('projectInfo', { file, needFileNameList: false }, nulToken);
|
||||
} catch {
|
||||
// noop
|
||||
}
|
||||
if (!res || !res.body) {
|
||||
if (!res || res.type !== 'response' || !res.body) {
|
||||
vscode.window.showWarningMessage(localize('typescript.projectConfigCouldNotGetInfo', 'Could not determine TypeScript or JavaScript project'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user