From 09a9df0991d3df36b29dce07a8e2289ed2f3eb23 Mon Sep 17 00:00:00 2001 From: Mateusz BurzyƄski Date: Thu, 9 Mar 2017 19:27:10 +0100 Subject: Removed outdated (untrue) API docs - chaining was removed in 53a44d8 (#44) --- README.md | 6 ------ src/index.js | 3 --- 2 files changed, 9 deletions(-) diff --git a/README.md b/README.md index 9c01c39..9eea963 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,6 @@ If present, `"*"` handlers are invoked prior to type-matched handlers. - `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The event type to invoke - `evt` **\[Any]** Any value (object is recommended and powerful), passed to each handler -Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `mitt` instance for chaining - ### on Register an event handler for the given type. @@ -119,8 +117,6 @@ Register an event handler for the given type. - `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to listen for, or `"*"` for all events - `handler` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function to call in response to given event -Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `mitt` instance for chaining - ### off Remove an event handler for the given type. @@ -130,8 +126,6 @@ Remove an event handler for the given type. - `type` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of event to unregister `handler` from, or `"*"` - `handler` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Handler function to remove -Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `mitt` instance for chaining - ## Contribute First off, thanks for taking the time to contribute! diff --git a/src/index.js b/src/index.js index 92b19f9..92ae0d8 100644 --- a/src/index.js +++ b/src/index.js @@ -22,7 +22,6 @@ export default function mitt(all: EventHandlerMap) { * * @param {String} type Type of event to listen for, or `"*"` for all events * @param {Function} handler Function to call in response to given event - * @return {Object} the `mitt` instance for chaining * @memberOf mitt */ on(type: string, handler: EventHandler) { @@ -34,7 +33,6 @@ export default function mitt(all: EventHandlerMap) { * * @param {String} type Type of event to unregister `handler` from, or `"*"` * @param {Function} handler Handler function to remove - * @return {Object} the `mitt` instance for chaining * @memberOf mitt */ off(type: string, handler: EventHandler) { @@ -48,7 +46,6 @@ export default function mitt(all: EventHandlerMap) { * * @param {String} type The event type to invoke * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler - * @return {Object} the `mitt` instance for chaining * @memberof mitt */ emit(type: string, evt: EventHandler) { -- cgit v1.2.3