(handler: (event: T) => void)
| 125 | } |
| 126 | |
| 127 | subscribe(handler: (event: T) => void): () => void { |
| 128 | this.emitter.on(this.config.channel, handler) |
| 129 | return () => { |
| 130 | this.emitter.off(this.config.channel, handler) |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | dispose(): void { |
| 135 | this.emitter.removeAllListeners() |