Skip to content

Commit

Permalink
Add overloads for Terminal.on
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Aug 19, 2017
1 parent 92ac427 commit e4e2fbf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions typings/xterm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ 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: 'data', listener: (data: string) => void): void;
on(type: 'key', listener: (key: string, event: KeyboardEvent) => void): void;
on(type: 'keypress' | 'keydown', listener: (event: KeyboardEvent) => void): void;
on(type: 'refresh', listener: (data: {element: HTMLElement, start: number, end: number}) => void): void;
on(type: 'resize', listener: (data: {terminal: Terminal, cols: number, rows: number}) => void): void;
on(type: 'scroll', listener: (ydisp: number) => void): void;
on(type: 'title', listener: (title: string) => void): void;
on(type: string, listener: (data: any) => void): void;

/**
Expand Down

0 comments on commit e4e2fbf

Please sign in to comment.