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
Is your feature request related to a problem? Please describe.
Most codebases have a strict naming convention, i.e prefixing every type with "i". This is not currently possible with typegen generate.
Describe the solution you'd like
Adding a format property to the sanity-typgen.json config file:
format
sanity-typgen.json
"format": { "schemaTypes": { "literal": "i{name}Schema", "nameCase": "camel" // camel | pascal | snake }, "queries": { "literal": "i{name}", "nameCase": "camel" } }
Open to suggestions for the api.
Example:
// sanity-typegen.json { "path": "'./**/*.{ts,tsx,js,jsx}'", "schema": "schema.json", "generates": "sanity.types.ts", "format": { "schemaTypes": { "literal": "i{name}Schema", "nameCase": "pascal" }, "queries": { "literal": "i{name}", "nameCase": "pascal" } } }
// Old result SomeDocumentType = {...}
// New result iSomeDocumentTypeSchema = {...}
Describe alternatives you've considered
Using as when importing
as
Additional context I have submitted a pr which I will extend later today: #6559
The text was updated successfully, but these errors were encountered:
The proof of concept is now finished #6559
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem? Please describe.
Most codebases have a strict naming convention, i.e prefixing every type with "i". This is not currently possible with typegen generate.
Describe the solution you'd like
Adding a
format
property to thesanity-typgen.json
config file:Open to suggestions for the api.
Example:
Describe alternatives you've considered
Using
as
when importingAdditional context
I have submitted a pr which I will extend later today: #6559
The text was updated successfully, but these errors were encountered: