mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-12 18:43:50 +00:00
chore(#14): Strongly type supabase client
This commit is contained in:
Vendored
+6
-5
@@ -1,22 +1,23 @@
|
|||||||
// See https://kit.svelte.dev/docs/types#app
|
// See https://kit.svelte.dev/docs/types#app
|
||||||
// for information about these interfaces
|
// for information about these interfaces
|
||||||
// and what to do when importing types
|
// and what to do when importing types
|
||||||
import { SupabaseClient, Session, User } from '@supabase/supabase-js'
|
import { SupabaseClient, Session, User } from '@supabase/supabase-js';
|
||||||
|
import type { Database } from '$types/supabase';
|
||||||
declare global {
|
declare global {
|
||||||
const __DATE__: string;
|
const __DATE__: string;
|
||||||
const __RELOAD_SW__: boolean;
|
const __RELOAD_SW__: boolean;
|
||||||
namespace App {
|
namespace App {
|
||||||
// interface Error {}
|
// interface Error {}
|
||||||
interface Locals {
|
interface Locals {
|
||||||
supabase: SupabaseClient
|
supabase: SupabaseClient<Database>;
|
||||||
safeGetSession(): Promise<{ session: Session | null; user: User | null }>
|
safeGetSession(): Promise<{ session: Session | null; user: User | null }>;
|
||||||
userid: string;
|
userid: string;
|
||||||
buildDate: string;
|
buildDate: string;
|
||||||
periodicUpdates: boolean;
|
periodicUpdates: boolean;
|
||||||
}
|
}
|
||||||
interface PageData {
|
interface PageData {
|
||||||
session: Session | null
|
session: Session | null;
|
||||||
}
|
}
|
||||||
// interface PageState {}
|
// interface PageState {}
|
||||||
// interface Platform {}
|
// interface Platform {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user