© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago
Captain

type error when using definition from openapi

I am using the openapi lib to generate the types for the db. when i want to select from specific table, i provide the generic in the FROM function. but that is apparently incorrect. i followed this example. https://supabase.com/docs/guides/api/generating-types but when i pass the generic in the same way as the example, i get the following error: No overload expects 1 type arguments, but overloads do exist that expect either 0 or 2 type arguments.

my code: const data = supabaseAdmin.from<definitions['account']>('account').select('')

example: const allOnlineUsers = await supabase.from<definitions['users']>('users') .select('
').eq('status', 'ONLINE')
Generating Types | Supabase
How to generate types for your API and Supabase libraries.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

CookieOptions type error when using example OAuth PKCE code from Supabase docs
SupabaseSSupabase / help-and-questions
3y ago
Type Error
SupabaseSSupabase / help-and-questions
3y ago
Type error when storing embeddings with OpenAI
SupabaseSSupabase / help-and-questions
8mo ago
504 error when using supabase auth
SupabaseSSupabase / help-and-questions
6mo ago