(type: keyof Shortcuts)
| 6 | #emitter = new EventTarget(); |
| 7 | |
| 8 | dispatch(type: keyof Shortcuts) { |
| 9 | this.#emitter.dispatchEvent(new Event(type)); |
| 10 | } |
| 11 | |
| 12 | on(type: keyof Shortcuts, cb: VoidFunction) { |
| 13 | this.#emitter.addEventListener(type, cb); |
no outgoing calls
no test coverage detected