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

View File

@@ -51,7 +51,7 @@ class Observable extends EventTarget {
/**
* Listen for a certain type of event.
* @param {string|Array<string>} type The event type or array of event types.
* @param {function(?): ?} listener The listener function.
* @param {import("./events.js").ListenerFunction} listener The listener function.
* @return {import("./events.js").EventsKey|Array<import("./events.js").EventsKey>} Unique key for the listener. If
* called with an array of event types as the first argument, the return
* will be an array of keys.