* Writes a JSON object to the SSE stream. * @param data The JSON data to send.
(data: MessageResponse)
| 14 | * @param data The JSON data to send. |
| 15 | */ |
| 16 | async writeStream(data: MessageResponse): Promise<void> { |
| 17 | const sseFormattedString = `data: ${JSON.stringify(data)}\n\n`; |
| 18 | await this.writer.write(this.encoder.encode(sseFormattedString)); |
| 19 | } |
| 20 | /** |
| 21 | * Closes the stream. |
| 22 | */ |
no outgoing calls
no test coverage detected