Is `z.effect()` safe to use?
Closed this issue · 2 comments
lpww commented
colinhacks commented
There's nothing z.effect
can do that isn't already expressible with either z.preprocess()
and .transform()
APIs. While it is part of the public API, there's really no reason to use it, which is why I didn't document it. Note also that there will likely be breaking changes to z.effect
in Zod 4 (the upcoming new major version), whereas the other two are more likely to be backwards-compatible.
lpww commented
Thanks @colinhacks