zod
zod copied to clipboard
Huge output `.d.ts` files when using `.catchall` with `.passthrough`
After upgrading from [email protected]
to [email protected]
, output .d.ts
files for schemas combining .catchall
with .passthrough
grew exponentially - on our project for one particular schema it exploded from 350 lines to 70k lines
This is a problem because it causes worse compile performance & GC failures when using tools like webpack.
You can check out a sample case to reproduce the error here (the repo also contains the comparison of output declaration sizes for different errors): https://github.com/vmajsuk/zod-d-ts-regression
We're also experiencing the same problem. Simple types are repeating the same data structures multiple times.