Skip to content

Commit

Permalink
Merge branch 'master' into pull_getCoords_into_module
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed May 22, 2017
2 parents 70e35de + 0fab4ff commit 06742eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/EventEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 06742eb

Please sign in to comment.