mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Remove use of any
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
"version": "0.0.1",
|
||||
"publisher": "Tyriar",
|
||||
"engines": {
|
||||
"vscode": "^1.6.0"
|
||||
"vscode": "^1.22.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
|
||||
@ -49,21 +49,15 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
terminalStack.push(vscode.window.createTerminal(`Ext Terminal #${terminalStack.length + 1}`));
|
||||
getLatestTerminal().sendText("echo 'Sent text immediately after creating'");
|
||||
}));
|
||||
|
||||
// Below coming in version v1.6
|
||||
context.subscriptions.push(vscode.commands.registerCommand('terminalTest.createZshLoginShell', () => {
|
||||
terminalStack.push((<any>vscode.window).createTerminal(`Ext Terminal #${terminalStack.length + 1}`, '/bin/zsh', ['-l']));
|
||||
terminalStack.push(vscode.window.createTerminal(`Ext Terminal #${terminalStack.length + 1}`, '/bin/zsh', ['-l']));
|
||||
}));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('terminalTest.processId', () => {
|
||||
(<any>getLatestTerminal()).processId.then((processId) => {
|
||||
getLatestTerminal().processId.then((processId) => {
|
||||
console.log(`Shell process ID: ${processId}`);
|
||||
});
|
||||
}));
|
||||
if ('onDidCloseTerminal' in <any>vscode.window) {
|
||||
(<any>vscode.window).onDidCloseTerminal((terminal) => {
|
||||
console.log('Terminal closed', terminal);
|
||||
});
|
||||
}
|
||||
vscode.window.onDidCloseTerminal((terminal) => console.log('Terminal closed', terminal));
|
||||
|
||||
function getLatestTerminal() {
|
||||
return terminalStack[terminalStack.length - 1];
|
||||
|
||||
Reference in New Issue
Block a user