Skip to content

Commit 1c9bfec

Browse files
authored
fix: consumeUint8ArrayReadableStream type (#1051)
* fix: consumeUint8ArrayReadableStream type * Create seven-emus-hug.md
1 parent 738a348 commit 1c9bfec

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/seven-emus-hug.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"edge-runtime": patch
3+
---
4+
5+
fix: consumeUint8ArrayReadableStream type

packages/runtime/src/server/body-streams.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ function isUint8ArrayChunk(value: any): value is Uint8Array {
104104
* emitted chunk is a `Uint8Array`. If there is some invalid chunk it will
105105
* throw.
106106
*/
107-
export async function* consumeUint8ArrayReadableStream(body?: ReadableStream) {
107+
export async function* consumeUint8ArrayReadableStream(
108+
body?: ReadableStream,
109+
): AsyncGenerator<Uint8Array, void, unknown> {
108110
const reader = body?.getReader()
109111
if (reader) {
110112
let error

0 commit comments

Comments
 (0)