本文整理匯總了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;
}
}