summaryrefslogtreecommitdiff
path: root/doc/api/stream.md
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2017-10-19 09:37:36 +0200
committerGireesh Punathil <gpunathi@in.ibm.com>2017-10-21 07:33:58 +0530
commit13951065a822ba59c300bcada886e4cdb83cd080 (patch)
tree4e7c61812552a2d81dc303edfb6efff0a750f1a7 /doc/api/stream.md
parentf8063d51d7e83ab6d5c7cfcadc37ed6b4f6d8ef5 (diff)
downloadnode-new-13951065a822ba59c300bcada886e4cdb83cd080.tar.gz
doc: improve {readable,writable}._destroy() docs
PR-URL: https://github.com/nodejs/node/pull/16313 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r--doc/api/stream.md18
1 files changed, 13 insertions, 5 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 8a758d75f3..d2af5cd933 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -1437,9 +1437,12 @@ user programs.
added: v8.0.0
-->
-* `err` {Error} An error.
-* `callback` {Function} A callback function that takes an optional error argument
- which is invoked when the writable is destroyed.
+* `err` {Error} A possible error.
+* `callback` {Function} A callback function that takes an optional error
+ argument.
+
+The `_destroy()` method is called by [`writable.destroy()`][writable-destroy].
+It can be overriden by child classes but it **must not** be called directly.
#### writable.\_final(callback)
<!-- YAML
@@ -1606,9 +1609,12 @@ user programs.
added: v8.0.0
-->
-* `err` {Error} An error.
+* `err` {Error} A possible error.
* `callback` {Function} A callback function that takes an optional error
- argument which is invoked when the readable is destroyed.
+ argument.
+
+The `_destroy()` method is called by [`readable.destroy()`][readable-destroy].
+It can be overriden by child classes but it **must not** be called directly.
#### readable.push(chunk[, encoding])
<!-- YAML
@@ -2232,4 +2238,6 @@ contain multi-byte characters.
[stream-resume]: #stream_readable_resume
[stream-write]: #stream_writable_write_chunk_encoding_callback
[readable-_destroy]: #stream_readable_destroy_err_callback
+[readable-destroy]: #stream_readable_destroy_error
[writable-_destroy]: #stream_writable_destroy_err_callback
+[writable-destroy]: #stream_writable_destroy_error