From 4404c1ad52eaaafb3f14f5393149822b1c0eba8b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 14 Sep 2016 16:34:50 -0700 Subject: [PATCH] Strongly type createTerminal --- package.json | 2 +- src/client/providers/execInTerminalProvider.ts | 4 ++-- src/client/unittests/common/runner.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6a931d8dd954..71079eecfacb 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "theme": "dark" }, "engines": { - "vscode": "^1.4.0" + "vscode": "^1.5.0" }, "categories": [ "Languages", diff --git a/src/client/providers/execInTerminalProvider.ts b/src/client/providers/execInTerminalProvider.ts index fc8df38c1738..c037b55ebdbc 100644 --- a/src/client/providers/execInTerminalProvider.ts +++ b/src/client/providers/execInTerminalProvider.ts @@ -37,7 +37,7 @@ function execInTerminal(fileUri?: vscode.Uri) { if (filePath.indexOf(' ') > 0) { filePath = `"${filePath}"`; } - const terminal = (vscode.window).createTerminal(`Python`); + const terminal = vscode.window.createTerminal(`Python`); terminal.sendText(`${currentPythonPath} ${filePath}`); } @@ -54,6 +54,6 @@ function execSelectionInTerminal() { return; } const code = vscode.window.activeTextEditor.document.getText(new vscode.Range(selection.start, selection.end)); - const terminal = (vscode.window).createTerminal(`Python`); + const terminal = vscode.window.createTerminal(`Python`); terminal.sendText(`${currentPythonPath} -c "${code}"`); } diff --git a/src/client/unittests/common/runner.ts b/src/client/unittests/common/runner.ts index 4736dedebcaf..05346f99130e 100644 --- a/src/client/unittests/common/runner.ts +++ b/src/client/unittests/common/runner.ts @@ -27,7 +27,7 @@ function runTestInTerminal(file: string, args: string[], cwd: string): Promisewindow).createTerminal(`Python Test Log`); + terminal = window.createTerminal(`Python Test Log`); return new Promise((resolve) => { setTimeout(function () {