aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRÅ«dolfs Vikmanis <[email protected]>2017-03-10 19:52:53 +0200
committerJason Miller <[email protected]>2017-03-10 12:52:53 -0500
commitc595dfb3df430fce81e877e187a107c8d5d86bc5 (patch)
tree098f5a8a734be3160ecac3c5ff81876539cc955d
parent09a9df0991d3df36b29dce07a8e2289ed2f3eb23 (diff)
Fix `emit` argument annotation (#45)
-rw-r--r--src/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 92ae0d8..75fd040 100644
--- a/src/index.js
+++ b/src/index.js
@@ -48,7 +48,7 @@ export default function mitt(all: EventHandlerMap) {
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
* @memberof mitt
*/
- emit(type: string, evt: EventHandler) {
+ emit(type: string, evt: any) {
(all[type] || []).map((handler) => { handler(evt); });
(all['*'] || []).map((handler) => { handler(type, evt); });
}