(type: EventType, payload: unknown)
| 20 | |
| 21 | return { |
| 22 | emit(type: EventType, payload: unknown) { |
| 23 | for (const callback of subscribers) { |
| 24 | try { |
| 25 | callback(type, payload); |
| 26 | } catch (error) { |
| 27 | logger.error('Error in event subscriber:', error); |
| 28 | } |
| 29 | } |
| 30 | }, |
| 31 | |
| 32 | subscribe(callback: EventCallback) { |
| 33 | subscribers.add(callback); |
nothing calls this directly
no outgoing calls
no test coverage detected