From 0a944a42c0125b5edbde2d943edcf8d021b8414c Mon Sep 17 00:00:00 2001 From: dev-script Date: Sun, 27 Sep 2020 12:58:42 +0530 Subject: [PATCH] doc,stream: write(chunk, encoding, cb) encoding can be null In stream write encoding can be null. Fixes: https://github.com/nodejs/node/issues/33715 PR-URL: https://github.com/nodejs/node/pull/35372 Reviewed-By: Antoine du Hamel --- doc/api/stream.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 10c68d9b4dd074..a421d4acb6dfa9 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -596,8 +596,8 @@ changes: not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any JavaScript value other than `null`. -* `encoding` {string} The encoding, if `chunk` is a string. **Default:** `'utf8'` -* `callback` {Function} Callback for when this chunk of data is flushed +* `encoding` {string|null} The encoding, if `chunk` is a string. **Default:** `'utf8'` +* `callback` {Function} Callback for when this chunk of data is flushed. * Returns: {boolean} `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.