writable._destroy(err, callback)


  • err <Error> 可能的错误。
  • callback <Function> 一个可选接收错误参数的回调函数。

_destroy() 方法由 writable.destroy() 调用。
它可以被子类重写,但 不能 直接调用。
此外,callback 不应与 async/await 混合使用,因为它在 Promise 被解决时执行。

🌐 The _destroy() method is called by 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.