17
Allow generation of Typescript types with camel case keys
Source: supabase/supabase#20249 · opened by @ashar-nadeem-lumi
When Typescript types are created, they keys of each object are 1:1 with the name of the column in SQL, which follows snake case conventions. However, Javascript follows the camel case convention for variable names and object keys. This requires an extra level of effort when using Supabase generated types with custom schemas, such as from zod. Some workarounds include using ts-case-convert or creating custom type wrappers, like CamelCase<T>, but these result in suboptimal dev experiences and overly verbose code.
No pledges yet. Be the first to back this.
Comments
Similar requests
Generated TypeScript Types - Add type safe to Tables
2 votes · 0 comments
Better Typescript Types
43 votes · 0 comments
Improved type inference for JSONB columns with check constraints in supabase typescript client
3 votes · 0 comments
Supabase-swift easier camel <> snake configuration?
2 votes · 0 comments
Native TypeScript Enums
2 votes · 0 comments
No comments yet.