Skip to content

Commit

Permalink
Merge pull request #30 from MadaraUchiha/bugfix/#29-correct-typing
Browse files Browse the repository at this point in the history
Correct TinyEmitter's types - Fixes #29
  • Loading branch information
scottcorgan committed Mar 13, 2018
2 parents 479797e + c4a4bd3 commit c1a4fef
Show file tree
Hide file tree
Showing 5 changed files with 1,867 additions and 10 deletions.
3 changes: 2 additions & 1 deletion dist/tinyemitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ E.prototype = {
};

module.exports = E;
module.exports.TinyEmitter = E;

},{}]},{},[1])(1)
});
});
2 changes: 1 addition & 1 deletion dist/tinyemitter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
declare class EventEmitter {
on (event: string, callback: Function, ctx?: any): EventEmitter;
once (event: string, callback: Function, ctx?: any): EventEmitter;
emit (event: string, ...args: any[]): EventEmitter;
off (event: string, callback?: Function): EventEmitter;
}

export = EventEmitter
export declare class TinyEmitter {
on(event: string, callback: Function, ctx?: any): this;
once(event: string, callback: Function, ctx?: any): this;
emit(event: string, ...args: any[]): this;
off(event: string, callback?: Function): this;
}
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ E.prototype = {
};

module.exports = E;
module.exports.TinyEmitter = E;
Loading

0 comments on commit c1a4fef

Please sign in to comment.