Skip to content

Commit

Permalink
fix(this): update emit to prototype, fixed #11
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed Apr 22, 2019
1 parent 8a1078b commit d62c451
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "onfire.js",
"officialName": "onfire.js",
"version": "2.0.0",
"version": "2.0.1",
"summary": "onfire.js is a mini (~500 b) version for event-emitter.",
"description": "onfire.js is a mini (~500 b) version for event-emitter.",
"author": {
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,7 @@ export default class OnFire {
}

// cname of fire
emit = this.fire;
emit(eventName: string, ...params: any[]) {
this.fire(eventName, ...params);
}
}

0 comments on commit d62c451

Please sign in to comment.