From 4865793c03ada33ed6e5e90c849366af1029d7f9 Mon Sep 17 00:00:00 2001 From: Abhishek Datta Date: Tue, 27 Apr 2021 16:33:52 +0530 Subject: [PATCH] Set listener parameter of once() as optional (#23) Solves #22 --- emitter.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emitter.d.ts b/emitter.d.ts index b2b32e9..0f75bb0 100644 --- a/emitter.d.ts +++ b/emitter.d.ts @@ -18,7 +18,7 @@ declare class EventEmitter { emit(type: TEventType, ...args: any[]): Promise; addListener(type: TEventType, listener: TListener): Promise; prependListener(type: TEventType, listener: TListener): Promise; - once(type: TEventType, listener: TListener): Promise; + once(type: TEventType, listener?: TListener): Promise; prependOnceListener(type: TEventType, listener: TListener): Promise; removeListener(type: TEventType, listener: TListener): Promise; removeAllListeners(type: string | symbol): Promise;