Skip to content

Commit

Permalink
fix: Further fix for node types.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Oct 31, 2024
1 parent 2a9a0de commit eba7822
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/sdk/server-node/src/Emits.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { EventEmitter } from 'events';

type Listener =
| ((...args: never) => void)
| ((...args: never) => void)
| ((...args: any) => void)
| ((...args: any[]) => void);

export type EventableConstructor<T = {}> = new (...args: any[]) => T;
export type Eventable = EventableConstructor<{ emitter: EventEmitter }>;

Expand Down Expand Up @@ -50,11 +56,11 @@ export function Emits<TBase extends Eventable>(Base: TBase) {
return this.emitter.getMaxListeners();
}

listeners(eventName: string | symbol): Array<() => void> {
listeners(eventName: string | symbol): Listener[] {
return this.emitter.listeners(eventName);
}

rawListeners(eventName: string | symbol): Array<() => void> {
rawListeners(eventName: string | symbol): Listener[] {
return this.emitter.rawListeners(eventName);
}

Expand Down

0 comments on commit eba7822

Please sign in to comment.