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 per the updated spec.

Fixes: https://github.com/nodejs/node/issues/62952

Signed-off-by: Jah-yee <166608075+Jah-yee@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/63017
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
This commit is contained in:
RoomWithOutRoof authored and Juan José Arboleda committed 2026-07-19 17:31:16 -05:00
1 parent 5c582b48c1
commit 9fc3e9b3ac
1 file changed
+1 -1
+1 -1
View File
@@ -671,7 +671,7 @@ class ReadableStreamBYOBRequest {
/**
* @readonly
* @type {ArrayBufferView}
* @type {Uint8Array}
*/
get view() {
if (!isReadableStreamBYOBRequest(this))