Use Zod 4.1 Codecs for transforms? #2518
alexanderhorner
started this conversation in
Ideas
Replies: 1 comment
-
It would certainly work, but you'd be trading bundle size and performance for type accuracy. It all depends on how large your schemas are and if that's an acceptable tradeoff |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Zod 4.1 added
codecs
, which provide typeddecode
andencode
helpers for bi-directional transforms. Would it make sense to try implementing the existing transformers with codecs?That could make the input/output mapping strongly typed and maybe simplify some of the runtime code.
Beta Was this translation helpful? Give feedback.
All reactions