auth-helpers icon indicating copy to clipboard operation
auth-helpers copied to clipboard

RealtimeSubscription type in incompatible with RealtimeSubscription type from supabase-js

Open mathewcst opened this issue 3 years ago • 0 comments

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()

mathewcst avatar Aug 12 '22 21:08 mathewcst