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 GitHub committed 2026-05-11 07:36:19 +00:00
1 parent 6f81dc3680
commit 0a60e9013b
1 file changed
+1 -1
+1 -1
View File
@@ -665,7 +665,7 @@ class ReadableStreamBYOBRequest {
/**
* @readonly
* @type {ArrayBufferView}
* @type {Uint8Array}
*/
get view() {
if (!isReadableStreamBYOBRequest(this))