(event: Payload, observer: (event: Payload) => Effect.Effect<void>)
| 396 | } |
| 397 | |
| 398 | const observe = (event: Payload, observer: (event: Payload) => Effect.Effect<void>) => |
| 399 | Effect.suspend(() => observer(event)).pipe( |
| 400 | Effect.catchCauseIf( |
| 401 | (cause) => !Cause.hasInterrupts(cause), |
| 402 | (cause) => Effect.logError("Event listener failed", { eventID: event.id, eventType: event.type, cause }), |
| 403 | ), |
| 404 | ) |
| 405 | |
| 406 | function notify(event: Payload, isolateListeners: boolean) { |
| 407 | return Effect.gen(function* () { |
no outgoing calls
no test coverage detected