(controller)
| 9 | function createStreamedResponse(chunks: number[][], contentLength?: number): Response { |
| 10 | return new Response(new ReadableStream<Uint8Array>({ |
| 11 | start(controller) { |
| 12 | for (const chunk of chunks) { |
| 13 | controller.enqueue(new Uint8Array(chunk)); |
| 14 | } |
| 15 | controller.close(); |
| 16 | }, |
| 17 | }), { |
| 18 | status: 200, |
| 19 | headers: contentLength === undefined ? undefined : { |