-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Injecting type definitions does not work #407
Comments
Any update on when this will be fixed? |
The types must be injected into https://supabase.com/docs/guides/auth/auth-helpers/sveltekit#typings This way you get autocompletion in every place without the need of passing the database types |
Thx @david-plugge that works :) |
Is there something else you need to run to make this work? Have updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report / Feature request
Describe the bug / missing feature
Typescript throws error "Expected 0 type arguments, but got 1" and types do not get injected when import { createClient } from "@supabase/auth-helpers-sveltekit"
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
`
import { createClient } from "@supabase/auth-helpers-sveltekit"
import type { Database } from "./database.types";
export const supabaseClient = createClient{PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY,}
`
Expected behavior
Same behaviour when importing { createClient } from "@supabase/supabase-js"
System information
Additional context
When importing from "@supabase/supabase-js" type injecting works but logout functionality does not work any more
Workaround
Create 2 clients one with the import from "@supabase/supabase-js" and one with the import from "@supabase/auth-helpers-sveltekit"
The text was updated successfully, but these errors were encountered: