Svish - Does inference somehow work differently...
Does inference somehow work differently with v4 than v3?
https://discord.com/channels/893487829802418277/1374618927920971817
1 Reply
I have something along the lines of this in v3, which has been working great, the
r3
is correctly typed as { foo: string }
:
But when I switch to v4, it breaks, and r4
here instead gets inferred as any
:
The only difference here is the change to the ZodType
type, which no longer requires the ZodTypeDef
generic, and the schema itself being a v4 type instead of a v3 type.
I can't figure out why any of this should break the inference and give me any
. Anyone else ran into this?