auth-helpers
auth-helpers copied to clipboard
RealtimeSubscription type in incompatible with RealtimeSubscription type from supabase-js
Bug report
I'm using AuthHelpers with Typescript. When setting up realtime, I've imported RealtimeSubscription type from '@supabase/supabase-js' and got the following error:
Type 'import("@supabase/auth-helpers-svelte/node_modules/@supabase/realtime-js/dist/module/RealtimeSubscription").default' is not assignable to type 'import("@supabase/realtime-js/dist/module/RealtimeSubscription").default'.
The types of 'socket.channels' are incompatible between these types.
Expected behavior
The types to be the same
Example
import type {
RealtimeSubscription
} from '@supabase/supabase-js'
let partySub: RealtimeSubscription
//... logic
partySub = await supabaseClient
.from('table')
.on('INSERT', handleInsert)
.subscribe()