Skip to main content
EventEmitter.EventEmitterAsyncResource.prototype.emitDestroy - node__events.d.ts - Node documentation
method EventEmitter.EventEmitterAsyncResource.prototype.emitDestroy

Usage in Deno

```typescript import { EventEmitter } from "node:node__events.d.ts"; ```
EventEmitterAsyncResource.prototype.emitDestroy(): void
Call all `destroy` hooks. This should only ever be called once. An error will be thrown if it is called more than once. This **must** be manually called. If the resource is left to be collected by the GC then the `destroy` hooks will never be called.

Return Type

void