From 5621821005e34e328248f26deb9183a7437fbd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20B=C3=BCrgy?= Date: Wed, 24 Jan 2024 11:54:17 +0100 Subject: [PATCH] Fix issue #52 from the Azure repo ReadableStreamDefaultReadResult --- src/parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse.ts b/src/parse.ts index c13e3c4..67e1eb7 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -21,7 +21,7 @@ export interface EventSourceMessage { */ export async function getBytes(stream: ReadableStream, onChunk: (arr: Uint8Array) => void) { const reader = stream.getReader(); - let result: ReadableStreamDefaultReadResult; + let result: ReadableStreamReadResult; while (!(result = await reader.read()).done) { onChunk(result.value); }