| 3 | const emitter = new events.EventEmitter(); |
| 4 | |
| 5 | class Publisher { |
| 6 | emitter: any; |
| 7 | |
| 8 | constructor(emitter: any) { |
| 9 | this.emitter = emitter; |
| 10 | } |
| 11 | |
| 12 | publish(channel: string, message: string): void { |
| 13 | this.emitter.emit(channel, message); |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | class Subscriber extends events.EventEmitter { |
| 18 | emitter: any; |
nothing calls this directly
no outgoing calls
no test coverage detected