(listener: NotificationListener)
| 305 | } |
| 306 | |
| 307 | subscribe(listener: NotificationListener): () => void { |
| 308 | this.listeners.add(listener) |
| 309 | void this.connect() |
| 310 | return () => { |
| 311 | this.listeners.delete(listener) |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | async close(): Promise<void> { |
| 316 | this.disposeMessageListener?.() |