Skip to content

Commit

Permalink
Fix types for the function broadcaster
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisprudlo committed Oct 27, 2024
1 parent a6f769c commit b4e6284
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/echo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ type Broadcaster = {
},
'function': {
connector: any,
public: any,
private: any,
presence: any,
public: Channel,
private: Channel,
presence: Channel,
}
};

Expand All @@ -245,7 +245,7 @@ type EchoOptions<T extends keyof Broadcaster> = {
/**
* The broadcast connector.
*/
broadcaster: T extends 'function' ? ((options: EchoOptions<'function'>) => void) : T,
broadcaster: T extends 'function' ? ((options: EchoOptions<T>) => void) : T,

[key: string]: any,
};

0 comments on commit b4e6284

Please sign in to comment.