stream: add comment about undocumented API

PR-URL: https://github.com/nodejs/node/pull/29805
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Robert Nagy 2019-10-01 20:44:02 +02:00 committed by Rich Trott
parent 389969ea92
commit 4fa1744e11

View File

@ -22,7 +22,8 @@ function needError(stream, err) {
return true;
}
// Undocumented cb() API, needed for core, not for public API
// Undocumented cb() API, needed for core, not for public API.
// The cb() will be invoked synchronously if _destroy is synchronous.
function destroy(err, cb) {
const r = this._readableState;
const w = this._writableState;