Skip to content

Commit b76bd41

Browse files
committed
chore: attempt deno fix
1 parent a8b0d01 commit b76bd41

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/index.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,18 @@ export const createClient = <
3333
keyof GetGenericDatabaseWithOptions<Database>['db'] = 'public' extends keyof GetGenericDatabaseWithOptions<Database>['db']
3434
? 'public'
3535
: string & keyof GetGenericDatabaseWithOptions<Database>['db'],
36-
Schema extends GenericSchema = GetGenericDatabaseWithOptions<Database>['db'][SchemaName] extends GenericSchema
36+
Schema = GetGenericDatabaseWithOptions<Database>['db'][SchemaName] extends GenericSchema
3737
? GetGenericDatabaseWithOptions<Database>['db'][SchemaName]
3838
: any
3939
>(
4040
supabaseUrl: string,
4141
supabaseKey: string,
4242
options?: SupabaseClientOptions<SchemaName>
43-
): SupabaseClient<Database, ClientOptions, SchemaName, Schema> => {
44-
return new SupabaseClient<Database, ClientOptions, SchemaName, Schema>(
45-
supabaseUrl,
46-
supabaseKey,
47-
options
48-
)
43+
) => {
44+
return new SupabaseClient<
45+
Database,
46+
ClientOptions,
47+
SchemaName,
48+
Schema extends GenericSchema ? Schema : any
49+
>(supabaseUrl, supabaseKey, options)
4950
}

test/deno/integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ Deno.test(
5959
const { error: deleteError } = await supabase
6060
.from('todos')
6161
.delete()
62-
.eq('id', createdTodo!.id)
62+
.eq('id', createdTodo!.id as string)
6363

6464
assertEquals(deleteError, null)
6565

6666
// Verify the todo was deleted
6767
const { data: fetchedTodo, error: fetchError } = await supabase
6868
.from('todos')
6969
.select('*')
70-
.eq('id', createdTodo!.id)
70+
.eq('id', createdTodo!.id as string)
7171
.single()
7272

7373
assertExists(fetchError)

0 commit comments

Comments
 (0)