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
The 'suffix' option only applies to the filename. The new 'modify' option applies to both the filename and the schema const.
Enhance this to be more specific : A third array value in modify can specify how the modifications are applied :
- Add an enum with modification types : file, schema, type - The third array value will be an array with any of those values. Examples:
["/address/", "_Address", [ 'schema' , 'type' ] ]
export const userAddress // undescore removed in camelCasing export type userAddressType filename remains useraddress.ts
["^log(.$)", "schema_$1_log", [ 'file' ] ]
export const logaudits export type logauditsType filename schema_audits_log.ts
["/address/", "_Address", [ 'schema' , 'type' ] ] ["^", "schema_", [ 'file' ] ] ["$", "Schema", [ 'schema' ] ] ["$", "ZodType", [ 'type' ] ]
export const userAddressSchema export type userAddressZodType filename schema_useraddress.ts // preference, don't capitalize for Linux
Going forward this can be used as an alternative/replacement for the suffix option. It also eliminates the hardcoded `${typeName}Type`.
suffix
`${typeName}Type`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The 'suffix' option only applies to the filename. The new 'modify' option applies to both the filename and the schema const.
Enhance this to be more specific : A third array value in modify can specify how the modifications are applied :
- Add an enum with modification types : file, schema, type
- The third array value will be an array with any of those values. Examples:
Going forward this can be used as an alternative/replacement for the
suffix
option. It also eliminates the hardcoded`${typeName}Type`
.The text was updated successfully, but these errors were encountered: