Open dts opened 4 months ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | b6e0beaab9dc80e90fbc1c76a73056c932aad848 |
There's a problem with this at the moment as it seems that the types imports (here) in the composables are being wiped out when running the build
command:
dist/runtime/composables/useSupabaseClient.d.ts
import type { SupabaseClient } from '@supabase/supabase-js';
export declare const useSupabaseClient: <T = unknown, S extends string & keyof T = Schema>() => SupabaseClient<T, S>;
https://github.com/nuxt-modules/supabase/issues/383#issuecomment-2236104268
For me this only works when running in the playground folder as the build is prepared using --stub
, which doesn't remove any import.
If you want to reproduce just run pnpm run build
and check dist/runtime/composables/useSupabaseClient.d.ts
. You will see that import type { Database, Schema } from '#build/types/supabase-database'
will be gone.
I am still figuring out how to fix this.
@dts @IsraelOrtuno Could you have a check now that https://github.com/nuxt-modules/supabase/pull/404 has been merged?
This fixed the issues with my PR so I would say it should work now @dts
This plumbs through a
config
-set schema name to the types system.Types of changes
Description
Currently, types do not correctly reflect overridden schemas. This PR allows that schema to be plumbed through reasonably.
Checklist: