We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I create JSON checks on columns with pg_jsonschema it would be super cool to have it also in generated ts types.
Currently when I create the following table
CREATE TABLE public.some_table ( id SERIAL PRIMARY KEY, arr jsonb not null check ( jsonb_matches_schema ('{ "type": "array", "items": { "type": "string" } }', arr ) ) );
Generating types with supabase gen types typescript produces the following types
supabase gen types typescript
... arr: JSON ...
But I'd like to get
... arr: string[] ...
Potentially it would be achievable by parsing passed schema in checks via a tool like https://github.com/bcherny/json-schema-to-typescript
Describe alternatives you've considered I haven't found any other alternatives aligned with the current CLI architecture
Additional context I don't know what I'd expect with more complex check expressions. Maybe ignore them and fall back to JSON.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I create JSON checks on columns with pg_jsonschema it would be super cool to have it also in generated ts types.
Currently when I create the following table
Generating types with
supabase gen types typescript
produces the following typesBut I'd like to get
Potentially it would be achievable by parsing passed schema in checks via a tool like https://github.com/bcherny/json-schema-to-typescript
Describe alternatives you've considered
I haven't found any other alternatives aligned with the current CLI architecture
Additional context
I don't know what I'd expect with more complex check expressions. Maybe ignore them and fall back to JSON.
The text was updated successfully, but these errors were encountered: