Support events with 2 args
This will allow higher perf events by avoiding object creation
This commit is contained in:
Vendored
+3
-3
@@ -336,8 +336,8 @@ declare module 'xterm' {
|
||||
* An event that can be listened to.
|
||||
* @returns an `IDisposable` to stop listening.
|
||||
*/
|
||||
export interface IEvent<T> {
|
||||
(listener: (e: T) => any): IDisposable;
|
||||
export interface IEvent<T, U = void> {
|
||||
(listener: (arg1: T, arg2: U) => any): IDisposable;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -444,7 +444,7 @@ declare module 'xterm' {
|
||||
* Currently this is only used for a certain type of mouse reports that
|
||||
* happen to be not UTF-8 compatible.
|
||||
* The event value is a JS string, pass it to the underlying pty as
|
||||
* binary data, e.g. `pty.write(Buffer.from(data, 'binary'))`.
|
||||
* binary data, e.g. `pty.write(Buffer.from(data, 'binary'))`.
|
||||
* @returns an `IDisposable` to stop listening.
|
||||
*/
|
||||
onBinary: IEvent<string>;
|
||||
|
||||
Reference in New Issue
Block a user