(topic: string, handler: (msg: T) => void)
| 68 | } |
| 69 | |
| 70 | subscribe<T>(topic: string, handler: (msg: T) => void) { |
| 71 | this.EE.on(topic, handler); |
| 72 | return this.EE.off.bind(this.EE, topic, handler) as () => void; |
| 73 | } |
| 74 | |
| 75 | publish<T>(topic: string, message: NonNullable<T>) { |
| 76 | chrome.runtime.sendMessage({ |