You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When emitting declaration files for a complex nested json the resulting declaration file can end up being quite large. I've shared a schema above generated from a large json (next data from a lululemon page) using https://transform.tools/typescript-to-zod. This results in a 17mb declaration file (.d.ts).
A quick look at the .d.ts file shows very large const declaraions of the the zod objects. Anything I can do to reduce this file size? If naively doing this as a human I could just modify the zod schema into an interface/type and avoid declaring the large consts, as the declaration files for inferred types don't need the zod context.
This is in a typescript project with the following tsconfig settings
luluNextData.txt
When emitting declaration files for a complex nested json the resulting declaration file can end up being quite large. I've shared a schema above generated from a large json (next data from a lululemon page) using https://transform.tools/typescript-to-zod. This results in a 17mb declaration file (.d.ts).
A quick look at the .d.ts file shows very large const declaraions of the the zod objects. Anything I can do to reduce this file size? If naively doing this as a human I could just modify the zod schema into an interface/type and avoid declaring the large consts, as the declaration files for inferred types don't need the zod context.
This is in a typescript project with the following tsconfig settings
The text was updated successfully, but these errors were encountered: