]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/EventEmitter.ts
Add missing EventEmitter.emit args/types
[mirror_xterm.js.git] / src / EventEmitter.ts
index 1db8676328edd4443e8d4a3629bf95953ee23dec..a4fd4542c3c8a97ad4e2aa9b88696a407890ccc0 100644 (file)
@@ -53,14 +53,11 @@ export class EventEmitter {
     return this.on(type, on);
   }
 
-  public emit(type): void {
+  public emit(type: string, ...args: any[]): void {
     if (!this._events[type]) {
       return;
     }
-
-    let args = Array.prototype.slice.call(arguments, 1);
     let obj = this._events[type];
-
     for (let i = 0; i < obj.length; i++) {
       obj[i].apply(this, args);
     }