Skip to content

Commit 0a60e90

Browse files
authored
lib: narrow ReadableStreamBYOBRequest.view return type to Uint8Array
Follow WHATWG streams spec update: whatwg/streams#1367 ReadableStreamBYOBRequest.view is always constructed as a Uint8Array. This changes the documented return type from ArrayBufferView to Uint8Array per the updated spec. Fixes: #62952 Signed-off-by: Jah-yee <166608075+Jah-yee@users.noreply.github.com> PR-URL: #63017 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com>
1 parent 6f81dc3 commit 0a60e90

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/internal/webstreams/readablestream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ class ReadableStreamBYOBRequest {
665665

666666
/**
667667
* @readonly
668-
* @type {ArrayBufferView}
668+
* @type {Uint8Array}
669669
*/
670670
get view() {
671671
if (!isReadableStreamBYOBRequest(this))

0 commit comments

Comments
 (0)