t
tRPC
J
tRPC
•
7mo ago
Johny
Zod Output validation failed
Hello
, i
'm using trpc and for some reason the return statement passes the type checks but at runtime it fails the zod validation
, why
?
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
Was this page helpful?
Yes
No
N
Nick
•
5/31/25, 6:53 PM
Because your data and type are not the same I
’d guess
, it
’s Zod
’s job to check this
N
Nick
Because your data and type are not the same I’d guess, it’s Zod’s job to check t...
J
Johny
OP
•
5/31/25, 7:51 PM
Yea
, but i
'd assume typescript would check for that
?
N
Nick
•
5/31/25, 7:52 PM
Only if the type is correct for your data
, and potentially only if strict is on