diff --git a/src/streaming.ts b/src/streaming.ts index c654f3b64..230234546 100644 --- a/src/streaming.ts +++ b/src/streaming.ts @@ -9,9 +9,14 @@ type ServerSentEvent = { }; export class Stream implements AsyncIterable { + controller: AbortController; + + private response: Response; private decoder: SSEDecoder; - constructor(private response: Response, private controller: AbortController) { + constructor(response: Response, controller: AbortController) { + this.response = response; + this.controller = controller; this.decoder = new SSEDecoder(); }