Skip to content

Commit 36dc881

Browse files
feat: change type for db
1 parent 458cdeb commit 36dc881

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/SupabaseClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class SupabaseClient<
103103
this.realtime = this._initRealtimeClient({ headers: this.headers, ...settings.realtime })
104104
this.rest = new PostgrestClient(`${_supabaseUrl}/rest/v1`, {
105105
headers: this.headers,
106-
schema: options?.db?.schema ?? 'public',
106+
schema: options?.db?.schema,
107107
fetch: this.fetch,
108108
throwOnError: this.shouldThrowOnError,
109109
})

src/lib/types.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type SupabaseClientOptions<SchemaName> = {
1212
* The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to 'public'.
1313
*/
1414
db?: {
15-
schema?: string
15+
schema?: SchemaName
1616
}
1717

1818
auth?: {
@@ -21,8 +21,7 @@ export type SupabaseClientOptions<SchemaName> = {
2121
*/
2222
autoRefreshToken?: boolean
2323
/**
24-
* Allows to enable/disable multi-tab/window events
25-
*/
24+
* Allows to enable/disable multi-tab/window /
2625
multiTab?: boolean
2726
/**
2827
* Whether to persist a logged in session to storage.
@@ -40,6 +39,10 @@ export type SupabaseClientOptions<SchemaName> = {
4039
* Options passed to the gotrue-js instance
4140
*/
4241
cookieOptions?: SupabaseAuthClientOptions['cookieOptions']
42+
/**
43+
* Allows to enable/disable multi-tab/window events
44+
*/
45+
multiTab?: boolean
4346
}
4447
/**
4548
* Options passed to the realtime-js instance

0 commit comments

Comments
 (0)