Skip to content

Commit

Permalink
types: Correct EventEmitter.on (static) return type
Browse files Browse the repository at this point in the history
  • Loading branch information
InkoHX committed Aug 19, 2022
1 parent 673262d commit 1a5e11f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/discord.js/typings/index.d.ts
Expand Up @@ -192,7 +192,10 @@ declare module 'node:events' {
class EventEmitter {
// Add type overloads for client events.
public static once<K extends keyof ClientEvents>(eventEmitter: Client, eventName: K): Promise<ClientEvents[K]>;
public static on<K extends keyof ClientEvents>(eventEmitter: Client, eventName: K): AsyncIterator<ClientEvents[K]>;
public static on<K extends keyof ClientEvents>(
eventEmitter: Client,
eventName: K,
): AsyncIterableIterator<ClientEvents[K]>;
}
}

Expand Down

0 comments on commit 1a5e11f

Please sign in to comment.