How can I (properly) use the locally downloaded types of my supabase db for use in an Edge Functions environment (Deno) to provide autocomplete suggestions in VS Code?
I tried doing it similarly to how it was done in my react supabase:
import "jsr:@supabase/functions-js/edge-runtime.d.ts"
import { createClient, SupabaseClient } from 'jsr:@supabase/supabase-js@2'
import { Database } from "../_types/supabase.ts";
const supabase = createClient<Database>(
Deno.env.get('SUPABASE_URL') ?? '',
Deno.env.get('SUPABASE_ANON_KEY') ?? '',
{ global: { headers: { Authorization: req.headers.get('Authorization')! } } }
)
But it doesn't seem to be working as VS Code isn't suggesting an autocomplete of my tables if I type it.
createClient<Database>, adding the Database types is supposed to make the resultingsupabasevalue have intellisense and types awareness. Instead, it's stillany