Fix a few compile issues when using TS 2.3 (#24731)

Tested recomppiling VSCode with TS2.3. This fixes a few issues that were discovered, including workarounds for:

* https://github.com/Microsoft/TypeScript/issues/15184
* https://github.com/Microsoft/TypeScript/issues/15185
This commit is contained in:
Matt Bierner
2017-04-13 17:14:50 -07:00
committed by GitHub
parent 1d05d0c49d
commit 0d14027696
5 changed files with 11 additions and 11 deletions

View File

@@ -460,7 +460,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
public goToProjectConfig(
isTypeScriptProject: boolean,
resource: Uri
): Thenable<TextEditor> | undefined {
): Thenable<TextEditor | undefined> | undefined {
const rootPath = workspace.rootPath;
if (!rootPath) {
window.showInformationMessage(
@@ -480,9 +480,10 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
return;
}
return this.client.execute('projectInfo', { file, needFileNameList: false }).then(res => {
return this.client.execute('projectInfo', { file, needFileNameList: false } as protocol.ProjectInfoRequestArgs).then(res => {
if (!res || !res.body) {
return window.showWarningMessage(localize('typescript.projectConfigCouldNotGetInfo', 'Could not determine TypeScript or JavaScript project'));
return window.showWarningMessage(localize('typescript.projectConfigCouldNotGetInfo', 'Could not determine TypeScript or JavaScript project'))
.then(() => void 0);
}
const { configFileName } = res.body;