Skip to content

Commit dff46b4

Browse files
authored
Merge pull request #312 from Tyriar/strongly_type_createTerminal
Strongly type createTerminal
2 parents a392521 + 4404c1a commit dff46b4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"theme": "dark"
2424
},
2525
"engines": {
26-
"vscode": "^1.4.0"
26+
"vscode": "^1.5.0"
2727
},
2828
"categories": [
2929
"Languages",

src/client/providers/execInTerminalProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function execInTerminal(fileUri?: vscode.Uri) {
3737
if (filePath.indexOf(' ') > 0) {
3838
filePath = `"${filePath}"`;
3939
}
40-
const terminal = (<any>vscode.window).createTerminal(`Python`);
40+
const terminal = vscode.window.createTerminal(`Python`);
4141
terminal.sendText(`${currentPythonPath} ${filePath}`);
4242

4343
}
@@ -54,6 +54,6 @@ function execSelectionInTerminal() {
5454
return;
5555
}
5656
const code = vscode.window.activeTextEditor.document.getText(new vscode.Range(selection.start, selection.end));
57-
const terminal = (<any>vscode.window).createTerminal(`Python`);
57+
const terminal = vscode.window.createTerminal(`Python`);
5858
terminal.sendText(`${currentPythonPath} -c "${code}"`);
5959
}

src/client/unittests/common/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function runTestInTerminal(file: string, args: string[], cwd: string): Promise<a
2727
commands.push(`cd ${cwd}`);
2828
}
2929
commands.push(`${file} ${args.join(' ')}`);
30-
terminal = (<any>window).createTerminal(`Python Test Log`);
30+
terminal = window.createTerminal(`Python Test Log`);
3131

3232
return new Promise<any>((resolve) => {
3333
setTimeout(function () {

0 commit comments

Comments
 (0)