writable._destroy(err, callback)


  • err <Error> 可能的错误。
  • callback <Function> 采用可选的错误参数的回调函数。

_destroy() 方法由 writable.destroy() 调用。 它可以被子类覆盖,但不能直接调用。 此外,callback 不应与 async/await 混合,一旦它在 promise 被解决时执行。

  • err <Error> A possible error.
  • callback <Function> A callback function that takes an optional error argument.

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.