doc: use same name in the doc as in the code

Refs: https://streams.spec.whatwg.org/#bytelengthqueuingstrategy
PR-URL: https://github.com/nodejs/node/pull/49216
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Hyunjin Kim 2023-08-20 01:15:22 +09:00 committed by GitHub
parent 78842cf213
commit cb4a6fafe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -1219,13 +1219,13 @@ changes:
description: This class is now exposed on the global object.
-->
#### `new ByteLengthQueuingStrategy(options)`
#### `new ByteLengthQueuingStrategy(init)`
<!-- YAML
added: v16.5.0
-->
* `options` {Object}
* `init` {Object}
* `highWaterMark` {number}
#### `byteLengthQueuingStrategy.highWaterMark`
@ -1256,13 +1256,13 @@ changes:
description: This class is now exposed on the global object.
-->
#### `new CountQueuingStrategy(options)`
#### `new CountQueuingStrategy(init)`
<!-- YAML
added: v16.5.0
-->
* `options` {Object}
* `init` {Object}
* `highWaterMark` {number}
#### `countQueuingStrategy.highWaterMark`

View File

@ -69,7 +69,7 @@ class ByteLengthQueuingStrategy {
constructor(init) {
validateObject(init, 'init');
if (init.highWaterMark === undefined)
throw new ERR_MISSING_OPTION('options.highWaterMark');
throw new ERR_MISSING_OPTION('init.highWaterMark');
// The highWaterMark value is not checked until the strategy
// is actually used, per the spec.
@ -121,7 +121,7 @@ class CountQueuingStrategy {
constructor(init) {
validateObject(init, 'init');
if (init.highWaterMark === undefined)
throw new ERR_MISSING_OPTION('options.highWaterMark');
throw new ERR_MISSING_OPTION('init.highWaterMark');
// The highWaterMark value is not checked until the strategy
// is actually used, per the spec.