From b6b10b7ef671f70afcb76154900204eff3b6fd18 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 31 May 2019 10:36:51 -0700 Subject: [PATCH] Remove deprecated destroy API Fixes #1371 --- fixtures/typings-test/typings-test.ts | 1 - src/Terminal.ts | 7 ------- src/TestUtils.test.ts | 3 --- src/Types.ts | 1 - src/public/Terminal.ts | 3 --- typings/xterm.d.ts | 7 ------- 6 files changed, 22 deletions(-) diff --git a/fixtures/typings-test/typings-test.ts b/fixtures/typings-test/typings-test.ts index 65c478c6..53938611 100644 --- a/fixtures/typings-test/typings-test.ts +++ b/fixtures/typings-test/typings-test.ts @@ -50,7 +50,6 @@ namespace methods_core { const t: Terminal = new Terminal(); t.blur(); t.focus(); - t.destroy(); t.clear(); t.refresh(0, 1); t.reset(); diff --git a/src/Terminal.ts b/src/Terminal.ts index a6903ef7..b77df953 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -290,13 +290,6 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II } } - /** - * @deprecated Use dispose instead. - */ - public destroy(): void { - this.dispose(); - } - private _setup(): void { Object.keys(DEFAULT_OPTIONS).forEach((key) => { if (this.options[key] === null || this.options[key] === undefined) { diff --git a/src/TestUtils.test.ts b/src/TestUtils.test.ts index 11e972b4..ea7980e6 100644 --- a/src/TestUtils.test.ts +++ b/src/TestUtils.test.ts @@ -99,9 +99,6 @@ export class MockTerminal implements ITerminal { dispose(): void { throw new Error('Method not implemented.'); } - destroy(): void { - throw new Error('Method not implemented.'); - } scrollPages(pageCount: number): void { throw new Error('Method not implemented.'); } diff --git a/src/Types.ts b/src/Types.ts index 5c121bad..7e01b99f 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -257,7 +257,6 @@ export interface IPublicTerminal extends IDisposable, IEventEmitter { selectAll(): void; selectLines(start: number, end: number): void; dispose(): void; - destroy(): void; scrollLines(amount: number): void; scrollPages(pageCount: number): void; scrollToTop(): void; diff --git a/src/public/Terminal.ts b/src/public/Terminal.ts index 346e514e..86a9cce1 100644 --- a/src/public/Terminal.ts +++ b/src/public/Terminal.ts @@ -121,9 +121,6 @@ export class Terminal implements ITerminalApi { this._addonManager.dispose(); this._core.dispose(); } - public destroy(): void { - this._core.destroy(); - } public scrollLines(amount: number): void { this._core.scrollLines(amount); } diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 097fd2d2..ac6cfc61 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -706,13 +706,6 @@ declare module 'xterm' { */ dispose(): void; - /** - * Destroys the terminal and detaches it from the DOM. - * - * @deprecated Use dispose() instead. - */ - destroy(): void; - /** * Scroll the display of the terminal * @param amount The number of lines to scroll down (negative scroll up).