diff options
author | Robert Nagy <ronagy@icloud.com> | 2020-01-05 20:41:31 +0300 |
---|---|---|
committer | Robert Nagy <ronagy@icloud.com> | 2020-02-09 01:23:12 +0300 |
commit | e559842188f541b884abff2ffad4d2d3e1b841a6 (patch) | |
tree | 43efbf696e890e1cf6ae5f851cfe30e420f3c179 /doc/api/stream.md | |
parent | 9c753b3dc2b465496a94d7ccffc3c9438c3ce325 (diff) |
stream: make readable & writable computed
This makes readable and writable automatically computed based
on the stream state.
Effectivly deprecating/discouraging manual management of this.
Makes the properties more consistent and easier to reason about.
Fixes: https://github.com/nodejs/node/issues/29377
PR-URL: https://github.com/nodejs/node/pull/31197
Refs: https://github.com/nodejs/node/issues/29377
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r-- | doc/api/stream.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 82cf99b4332..cf3ecd461c1 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -495,7 +495,8 @@ added: v11.4.0 * {boolean} -Is `true` if it is safe to call [`writable.write()`][stream-write]. +Is `true` if it is safe to call [`writable.write()`][stream-write], which means +the stream has not been destroyed, errored or ended. ##### `writable.writableEnded` <!-- YAML @@ -1134,7 +1135,8 @@ added: v11.4.0 * {boolean} -Is `true` if it is safe to call [`readable.read()`][stream-read]. +Is `true` if it is safe to call [`readable.read()`][stream-read], which means +the stream has not been destroyed or emitted `'error'` or `'end'`. ##### `readable.readableEncoding` <!-- YAML |