Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

createClient

Creates a new Supabase Client.

const createClient: <Database = any, SchemaNameOrClientOptions extends (string & Exclude<keyof Database, "__InternalSupabase">) | {
PostgrestVersion: string;
}
= "public" extends Exclude<keyof Database, "__InternalSupabase"> ? "public" : string & Exclude<keyof Database, "__InternalSupabase">
, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> = SchemaNameOrClientOptions extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaNameOrClientOptions : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">>
(
supabaseUrl: string,
supabaseKey: string,
options?: SupabaseClientOptions<SchemaName> | undefined,
) => SupabaseClient<Database, SchemaNameOrClientOptions, SchemaName, Omit<Database, "__InternalSupabase">[SchemaName] extends import("./lib/types.d.ts").GenericSchema ? Omit<Database, "__InternalSupabase">[SchemaName] : never, SchemaNameOrClientOptions extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
__InternalSupabase: {
PostgrestVersion: string;
}
;
}
? Database["__InternalSupabase"] : {
PostgrestVersion: "12";
}
: SchemaNameOrClientOptions extends {
PostgrestVersion: string;
}
? SchemaNameOrClientOptions : never
>
;