Skip to content

Commit

Permalink
refactor: add setCachedName name in tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
NanderTGA committed Jan 30, 2024
1 parent 0b7759f commit 57ada1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eventHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type EventHandlersObject = {
export type EventHandlerArguments<K extends keyof ServerToClientEventsWithReserved = keyof ServerToClientEventsWithReserved>
= Parameters<ServerToClientEventsWithReserved[K]>;
export type EventHandlerFunction<K extends keyof ServerToClientEventsWithReserved = keyof ServerToClientEventsWithReserved>
= (this: Client, ...args: [ ...EventHandlerArguments<K>, (name: string) => void ]) => void;
= (this: Client, ...args: [ ...EventHandlerArguments<K>, setCachedName: (name: string) => void ]) => void;

const mainEventHandlers: EventHandlersObject = {
werror(reason) {
Expand Down

0 comments on commit 57ada1d

Please sign in to comment.