(ctrl)
| 273 | ): Response { |
| 274 | const stream = new ReadableStream({ |
| 275 | async start(ctrl) { |
| 276 | try { |
| 277 | for await (const chunk of gen) { |
| 278 | ctrl.enqueue(new TextEncoder().encode(chunk)); |
| 279 | } |
| 280 | ctrl.close(); |
| 281 | } catch (e) { |
| 282 | ctrl.error(e); |
| 283 | } |
| 284 | }, |
| 285 | }); |
| 286 | return new Response(stream, { |
| 287 | status, |
nothing calls this directly
no outgoing calls
no test coverage detected