doc: add usage recommendation for writable._destroy

PR-URL: https://github.com/nodejs/node/pull/41040
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Rafael Gonzaga authored and Michaël Zasso committed 2022-01-14 16:19:35 +01:00
1 parent 90617b9303
commit 29563abd85
1 file changed
+2
+2
View File
@@ -2689,6 +2689,8 @@ added: v8.0.0
The `_destroy()` method is called by [`writable.destroy()`][writable-destroy].
It can be overridden by child classes but it **must not** be called directly.
Furthermore, the `callback` should not be mixed with async/await
once it is executed when a promise is resolved.
#### `writable._final(callback)`