Fix types

This commit is contained in:
Andreas Hocevar
2020-03-10 14:20:12 +01:00
parent e099257461
commit 4fa454f2b3
3 changed files with 19 additions and 14 deletions
+9 -2
View File
@@ -13,15 +13,22 @@ import {clear} from './obj.js';
* @api
*/
/**
* Listener function. This function is called with an event object as argument.
* When the function returns `false`, event propagation will stop.
*
* @typedef {EventListener|function((Event|import("./events/Event.js").default)): (void|boolean)} ListenerFunction
* @typedef {function((Event|import("./events/Event.js").default)): (void|boolean)} ListenerFunction
* @api
*/
/**
* @typedef {Object} ListenerObject
* @property {ListenerFunction} handleEvent
*/
/**
* @typedef {ListenerFunction|ListenerObject} Listener
*/
/**
* Registers an event listener on an event target. Inspired by