Skip to content

Commit 0e31126

Browse files
fix: type error for callback of on()
Parameter of callback function of on() should have SupabaseRealtimePayload type instead of any Function.
1 parent 329edd0 commit 0e31126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/SupabaseRealtimeClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class SupabaseRealtimeClient {
3232
* @param event The event
3333
* @param callback A callback function that is called whenever the event occurs.
3434
*/
35-
on(event: SupabaseEventTypes, callback: Function) {
35+
on(event: SupabaseEventTypes, callback: (payload: SupabaseRealtimePayload<any>) => void) {
3636
this.subscription.on(event, (payload: any) => {
3737
let enrichedPayload: SupabaseRealtimePayload<any> = {
3838
schema: payload.schema,

0 commit comments

Comments
 (0)