Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: improve {readable,writable}._destroy() docs #16313

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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