From e848d6afbe24136073887abea218f296ddc871ce Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 19 Aug 2017 14:33:41 -0700 Subject: [PATCH] Remove open event Fixes #901 --- fixtures/typings-test/typings-test.ts | 2 -- src/Terminal.ts | 7 ------- typings/xterm.d.ts | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fixtures/typings-test/typings-test.ts b/fixtures/typings-test/typings-test.ts index 0770233a..f99d6ea3 100644 --- a/fixtures/typings-test/typings-test.ts +++ b/fixtures/typings-test/typings-test.ts @@ -63,7 +63,6 @@ namespace methods_core { t.on('blur', () => {}); t.on('focus', () => {}); t.on('lineFeed', () => {}); - t.on('open', () => {}); // args t.on('data', () => {}); t.on('data', (data: string) => console.log(data)); @@ -89,7 +88,6 @@ namespace methods_core { t.off('blur', () => {}); t.off('focus', () => {}); t.off('lineFeed', () => {}); - t.off('open', () => {}); // args t.off('data', () => {}); t.off('data', (data: string) => console.log(data)); diff --git a/src/Terminal.ts b/src/Terminal.ts index 686cffd8..42d3fc3f 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -765,13 +765,6 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT // Listen for mouse events and translate // them into terminal mouse protocols. this.bindMouse(); - - /** - * This event is emitted when terminal has completed opening. - * - * @event open - */ - this.emit('open'); } /** diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index c8df78fc..80cc14a8 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -112,7 +112,7 @@ declare module 'xterm' { * @param type The type of the event. * @param listener The listener. */ - on(type: 'blur' | 'focus' | 'lineFeed' | 'open', listener: () => void): void; + on(type: 'blur' | 'focus' | 'lineFeed', listener: () => void): void; /** * Registers an event listener. * @param type The type of the event. @@ -161,7 +161,7 @@ declare module 'xterm' { * @param type The type of the event. * @param listener The listener. */ - off(type: 'blur' | 'focus' | 'lineFeed' | 'open' | 'data' | 'key' | 'keypress' | 'keydown' | 'refresh' | 'resize' | 'scroll' | 'title', listener: (...args: any[]) => void): void; + off(type: 'blur' | 'focus' | 'lineFeed' | 'data' | 'key' | 'keypress' | 'keydown' | 'refresh' | 'resize' | 'scroll' | 'title', listener: (...args: any[]) => void): void; /** * Resizes the terminal.