From 84e6dec3e188f2a42fe3d8d5db202637453d298a Mon Sep 17 00:00:00 2001 From: Ved Prakash Arya Date: Sun, 26 Apr 2026 17:26:23 +0530 Subject: [PATCH] webstreams: narrow ReadableStreamBYOBRequest.view to Uint8Array ReadableStreamBYOBRequest.view is always constructed as a Uint8Array, and the specification will be updated to enforce this. Reflect this by changing the documented return type from ArrayBufferView to Uint8Array. Refs: https://github.com/whatwg/streams/pull/1367 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))