1
Types and generic `from<T>`
Source: supabase/supabase#6816 · opened by @AlbinoGeek
Synopsis The types in @supabase/supabase-js such as User don't quite line up with .from<T>(string) don't quite line up with their usage, such as .eq('email_confirmed_at', null). Description So, say we use a type like User from @supabase/supabase-js Then we write a query using one of the "possibly undefined" fields: Now, unfortunately, this fails ESLint, because null isn't a valid value for email_confirmed_at. The same thing happens when using Update. Possible Solutions Maybe eq and other comparators should accept T | null as it's value, so that null is always a valid value? --- This is an idea versus an issue, because I'm not sold on this being the solution. I'd rather someone who uses supabase more than me weigh in on the implications of such a change. Disclaimer: Yes, I'm aware User might not be the best example, since auth is a private collection, but this applies to all types that…
No pledges yet. Be the first to back this.
Comments
Similar requests
Better Typescript Types
43 votes · 0 comments
Support for PostgreSQL Domain Types in Supabase UI
4 votes · 0 comments
Feature Request: Add Copy & Paste Functionality for Generated Types in Supabase Dashboard
3 votes · 0 comments
Improved type inference for JSONB columns with check constraints in supabase typescript client
3 votes · 0 comments
Add schema-aware Functions, Args, and Returns helper types to generated Supabase TypeScript types
1 vote · 0 comments
No comments yet.