From 9ef45721cce15d1957aac6da65beec7fcfeb2e2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 25 Sep 2023 12:42:36 +0200 Subject: [PATCH] fix: fix event emitter local types definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- @types/events.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/@types/events.d.ts b/@types/events.d.ts index b2da7b09..ae0f8f50 100644 --- a/@types/events.d.ts +++ b/@types/events.d.ts @@ -26,6 +26,8 @@ declare module 'events' { * * The EventEmitterAsyncResource class has the same methods and takes the * same options as EventEmitter and AsyncResource themselves. + * @throws if `options.name` is not provided when instantiated directly. + * @since v17.4.0, v16.14.0 */ export class EventEmitterAsyncResource extends EventEmitter { constructor (options?: EventEmitterAsyncResourceOptions) @@ -34,9 +36,8 @@ declare module 'events' { * 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 A reference to `asyncResource`. */ - emitDestroy (): AsyncResource + emitDestroy (): void /** The unique asyncId assigned to the resource. */ readonly asyncId: number /** The same triggerAsyncId that is passed to the AsyncResource constructor. */ -- 2.34.1