Skip to content

Commit

Permalink
fix: type error for callback of on()
Browse files Browse the repository at this point in the history
Parameter of callback function of on() should have SupabaseRealtimePayload type instead of any Function.
  • Loading branch information
PhoenixCreation authored May 25, 2021
1 parent 329edd0 commit 0e31126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/SupabaseRealtimeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class SupabaseRealtimeClient {
* @param event The event
* @param callback A callback function that is called whenever the event occurs.
*/
on(event: SupabaseEventTypes, callback: Function) {
on(event: SupabaseEventTypes, callback: (payload: SupabaseRealtimePayload<any>) => void) {
this.subscription.on(event, (payload: any) => {
let enrichedPayload: SupabaseRealtimePayload<any> = {
schema: payload.schema,
Expand Down

0 comments on commit 0e31126

Please sign in to comment.