From 8eb1773c1a7a39ac582c0c1eb036439f27713d46 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 --- 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 8a758d75f3593d..d2af5cd93370bf 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])