doc: mark some parameters as optional in webstreams · nodejs/node@f39fb8c · GitHub
Skip to content

Commit f39fb8c

Browse files
deokjinkimruyadorno
authored andcommitted
doc: mark some parameters as optional in webstreams
Some parameters are described as optional in spec, so update mismatched parameter. Refs: https://streams.spec.whatwg.org/ PR-URL: #46269 Refs: https://streams.spec.whatwg.org/ Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 7a9af38 commit f39fb8c

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

doc/api/webstreams.md

Lines changed: 4 additions & 4 deletions

lib/internal/webstreams/readablestream.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ class ReadableStreamDefaultReader {
861861
}
862862

863863
/**
864-
* @param {any} reason
864+
* @param {any} [reason]
865865
* @returns {Promise<void>}
866866
*/
867867
cancel(reason = undefined) {
@@ -977,7 +977,7 @@ class ReadableStreamBYOBReader {
977977
}
978978

979979
/**
980-
* @param {any} reason
980+
* @param {any} [reason]
981981
* @returns {Promise<void>}
982982
*/
983983
cancel(reason = undefined) {
@@ -1029,7 +1029,7 @@ class ReadableStreamDefaultController {
10291029
}
10301030

10311031
/**
1032-
* @param {any} chunk
1032+
* @param {any} [chunk]
10331033
*/
10341034
enqueue(chunk = undefined) {
10351035
if (!readableStreamDefaultControllerCanCloseOrEnqueue(this))
@@ -1038,7 +1038,7 @@ class ReadableStreamDefaultController {
10381038
}
10391039

10401040
/**
1041-
* @param {any} error
1041+
* @param {any} [error]
10421042
*/
10431043
error(error = undefined) {
10441044
readableStreamDefaultControllerError(this, error);
@@ -1152,7 +1152,7 @@ class ReadableByteStreamController {
11521152
}
11531153

11541154
/**
1155-
* @param {any} error
1155+
* @param {any} [error]
11561156
*/
11571157
error(error = undefined) {
11581158
if (!isReadableByteStreamController(this))

lib/internal/webstreams/writablestream.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)