After upgrading from zod@3.21.0 to zod@3.21.4, 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
After upgrading from
zod@3.21.0
tozod@3.21.4
, 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 linesThis 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