本文整理汇总了TypeScript中vscode.Terminal.dispose方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Terminal.dispose方法的具体用法?TypeScript Terminal.dispose怎么用?TypeScript Terminal.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vscode.Terminal
的用法示例。
在下文中一共展示了Terminal.dispose方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: done
const reg2 = renderer.onDidChangeMaximumDimensions(dimensions => {
assert.ok(dimensions.columns > 0);
assert.ok(dimensions.rows > 0);
reg2.dispose();
const reg3 = window.onDidCloseTerminal(() => {
reg3.dispose();
done();
});
terminal.dispose();
});
示例2: if
const reg3 = window.onDidChangeTerminalDimensions((event: TerminalDimensionsChangeEvent) => {
if (event.terminal === terminal1) {
// The original terminal should fire dimension change after a split
firstCalled = true;
} else if (event.terminal !== terminal1) {
// The new split terminal should fire dimension change
secondCalled = true;
}
if (firstCalled && secondCalled) {
terminal1.dispose();
terminal2.dispose();
reg3.dispose();
done();
}
});
示例3: deactivate
export function deactivate() {
if (terminal) {
terminal.dispose();
}
}
示例4: stopRunningTask
public stopRunningTask(): void {
if (this._runningTerminal) {
this._runningTerminal.dispose();
this._runningTerminal = undefined;
}
}