( input: CreateLoopEventDispatcherInput, event: LoopRecordedEvent, )
| 171 | } |
| 172 | |
| 173 | async function recordEvent( |
| 174 | input: CreateLoopEventDispatcherInput, |
| 175 | event: LoopRecordedEvent, |
| 176 | ): Promise<void> { |
| 177 | await input.appendTranscriptRecord(event); |
| 178 | safeEmitLive(input.emitLiveEvent, event); |
| 179 | } |
| 180 | |
| 181 | function safeEmitLive(emit: LoopLiveEventEmitter | undefined, event: LoopEvent): void { |
| 182 | if (emit === undefined) return; |
no test coverage detected