chore(#14): Strongly type supabase client

This commit is contained in:
Josh Creek
2024-07-04 20:05:22 +01:00
parent 8634e56bd1
commit a10d22d1f8
+6 -5
View File
@@ -1,22 +1,23 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// 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 {
const __DATE__: string;
const __RELOAD_SW__: boolean;
namespace App {
// interface Error {}
interface Locals {
supabase: SupabaseClient
safeGetSession(): Promise<{ session: Session | null; user: User | null }>
supabase: SupabaseClient<Database>;
safeGetSession(): Promise<{ session: Session | null; user: User | null }>;
userid: string;
buildDate: string;
periodicUpdates: boolean;
}
interface PageData {
session: Session | null
}
session: Session | null;
}
// interface PageState {}
// interface Platform {}
}