File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/sdk/server-node/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import { EventEmitter } from 'events' ;
22
3+ type Listener =
4+ | ( ( ...args : never ) => void )
5+ | ( ( ...args : never ) => void )
6+ | ( ( ...args : any ) => void )
7+ | ( ( ...args : any [ ] ) => void ) ;
8+
39export type EventableConstructor < T = { } > = new ( ...args : any [ ] ) => T ;
410export type Eventable = EventableConstructor < { emitter : EventEmitter } > ;
511
@@ -50,11 +56,11 @@ export function Emits<TBase extends Eventable>(Base: TBase) {
5056 return this . emitter . getMaxListeners ( ) ;
5157 }
5258
53- listeners ( eventName : string | symbol ) : Array < ( ) => void > {
59+ listeners ( eventName : string | symbol ) : Listener [ ] {
5460 return this . emitter . listeners ( eventName ) ;
5561 }
5662
57- rawListeners ( eventName : string | symbol ) : Array < ( ) => void > {
63+ rawListeners ( eventName : string | symbol ) : Listener [ ] {
5864 return this . emitter . rawListeners ( eventName ) ;
5965 }
6066
You can’t perform that action at this time.
0 commit comments