@supabase/auth-helpers-react
Advanced tools
Comparing version 0.3.0-next.2 to 0.3.0-next.3
# @supabase/auth-helpers-react | ||
## 0.3.0-next.3 | ||
### Patch Changes | ||
- 3154f16: fix: typing for useSupabaseClient. | ||
## 0.3.0-next.2 | ||
@@ -4,0 +10,0 @@ |
import * as _supabase_supabase_js from '@supabase/supabase-js'; | ||
import { SupabaseClient, Session, AuthError } from '@supabase/supabase-js'; | ||
export { Session, SupabaseClient, User } from '@supabase/supabase-js'; | ||
import * as _supabase_supabase_js_dist_module_lib_types from '@supabase/supabase-js/dist/module/lib/types'; | ||
import { PropsWithChildren } from 'react'; | ||
@@ -33,3 +34,3 @@ | ||
declare const useSessionContext: () => SessionContext; | ||
declare const useSupabaseClient: () => SupabaseClient<any, "public", any>; | ||
declare function useSupabaseClient<Database = any, SchemaName extends string & keyof Database = 'public' extends keyof Database ? 'public' : string & keyof Database>(): SupabaseClient<Database, SchemaName, Database[SchemaName] extends _supabase_supabase_js_dist_module_lib_types.GenericSchema ? Database[SchemaName] : any>; | ||
declare const useSession: () => Session | null; | ||
@@ -36,0 +37,0 @@ declare const useUser: () => _supabase_supabase_js.AuthUser | null; |
@@ -118,3 +118,3 @@ var __create = Object.create; | ||
}; | ||
var useSupabaseClient = () => { | ||
function useSupabaseClient() { | ||
const context = (0, import_react.useContext)(SessionContext); | ||
@@ -125,3 +125,3 @@ if (context === void 0) { | ||
return context.supabaseClient; | ||
}; | ||
} | ||
var useSession = () => { | ||
@@ -128,0 +128,0 @@ const context = (0, import_react.useContext)(SessionContext); |
{ | ||
"name": "@supabase/auth-helpers-react", | ||
"version": "0.3.0-next.2", | ||
"version": "0.3.0-next.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21910
361