From ccf2cc1e0cc109b922a8a908c66ec27b5e6c05a5 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Thu, 19 Oct 2017 09:37:36 +0200 Subject: [PATCH] doc: improve {readable,writable}._destroy() docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/16313 Reviewed-By: Anatoli Papirovski Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Gireesh Punathil --- doc/api/stream.md | 18 +++++++++++++----- 1 file 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) -* `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])