-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useSupabaseClient, useSupabaseSession, useSupabaseUser all resolve types to any #383
Comments
Same issue here. Downgrading to 1.2.0 gives the type for client, however useSupabaseUser was still any. The typing files are just empty |
Me too, normal after returning to 1.2 |
It may comes from this PR who was merged in v1.3.1: #366 |
@IsraelOrtuno could you have a check at this? Seems to be related to your PR. |
Let me to it... |
All seems good when running it within the The file 56dc39e#diff-b55cdbef4907b7045f32cc5360d48d262cca5f94062e353089f189f4460039e0R5 https://www.typescriptlang.org/tsconfig/#declaration
Seems to be the cause to me. @larbish do you think this can be related? If so, not sure if this could be fixed by omitting that property or if there's a way to force generating certain .d.ts files. |
I found the same thing. All my .d.ts files were empty when I switched to 1.3, switched back to 1.2 and the .d.ts were successfully generated. |
Same here |
Me too, the export type Database = unknown However, I named my type file as the doc says: |
The proxy typing works fine on my end when the file exists, the problem seems to be more related to:
|
Probably related: import { serverSupabaseClient } from "#supabase/server";
|
Should be resolved in |
Hello @IsraelOrtuno, I'm in v1.3.5 with a fresh "npx nuxi upgrade -f" install, |
The problem is there but it's not related to this thread, 1.3.5 fixed the issue of I will open an issue myself to track this. Seems like types are lost when running the |
@IsraelOrtuno Thank you very much! |
I would create a wrapper composable in the meanwhile so you don't have to pass the types manually every time you want to use the client. |
Hello @IsraelOrtuno isn't that what the PR #366 was supposed to allow? Were you able to find out what the problem was? |
All should be fixed in 1.4.0 |
I've tried with npm and bun to install and use nuxt-supabase, however from version 1.3.1, all the composable resolve their return type to any, I've tried set up a clean VSCode profile with just Typescript nightly and vue-official tools installed, still no luck and type resolution is still to any. Screens are from the clean profile on VSCode:
The text was updated successfully, but these errors were encountered: