Type definition of `. once(type, listener)` should have listener as optional parameter
abdatta opened this issue ยท 3 comments
abdatta commented
In the type definition, we see:
Line 21 in b001fa2
It should be instead:
once(type: TEventType, listener?: TListener): Promise<any>;
since the listener parameter is optional as per documentation:
emitter.once(eventName)
Returns a Promise that is resolved once only after all listeners for the specified event have been called for the given event. (Any newListener event will be emitted.)
@yanickrochon Let me know if you agree. I'll raise a PR for the same.
yanickrochon commented
Sounds about right! I do not use TS, personally, so all these PR are for the community ๐
yanickrochon commented
Sorry, it's published!