Closed sleewoo closed 2 months ago
fix for https://github.com/fabien0102/ts-to-zod/issues/263
I dared to rename requiresImport in generateZodSchema.ts but it was not used for anything else, just to signal about enum import.
requiresImport
generateZodSchema.ts
Also added sourceEnumImports in generate.ts to collect enum imports and distinguish between another imports.
sourceEnumImports
generate.ts
Finally modified sourceTypeImportsValues array by appending type notation to non-enum imports.
sourceTypeImportsValues
Hoping this is in accordance with project style.
Thanks.
Why
fix for https://github.com/fabien0102/ts-to-zod/issues/263
I dared to rename
requiresImport
ingenerateZodSchema.ts
but it was not used for anything else, just to signal about enum import.Also added
sourceEnumImports
ingenerate.ts
to collect enum imports and distinguish between another imports.Finally modified
sourceTypeImportsValues
array by appending type notation to non-enum imports.Hoping this is in accordance with project style.
Thanks.