From fb1859cbebea29d7aa32db2c3586de5f77f64263 Mon Sep 17 00:00:00 2001 From: Jah-yee <41765174+Jah-yee@users.noreply.github.com> Date: Sun, 26 Apr 2026 02:38:00 +0800 Subject: [PATCH] lib: narrow ReadableStreamBYOBRequest.view return type to Uint8Array Follow WHATWG streams spec update: https://github.com/whatwg/streams/pull/1367 ReadableStreamBYOBRequest.view is always constructed as a Uint8Array. This changes the documented return type from ArrayBufferView to Uint8Array. Fixes: https://github.com/nodejs/node/issues/62952 --- lib/internal/webstreams/readablestream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index 597135778a1e0f..c79a5a6f8c4a86 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -672,7 +672,7 @@ class ReadableStreamBYOBRequest { /** * @readonly - * @type {ArrayBufferView} + * @type {Uint8Array} */ get view() { if (!isReadableStreamBYOBRequest(this))