I have 2 types of user, guest and registered(schemas). I have a union type with both and the guest doesn't include the "admin" field. I expect Zod to pick one of the 2 schemas but when I do user.admin it just doesn't exist. What is this union doing then?? I'm very confused.
No replies yet
Join the Discord to continue the conversation
t
tRPC
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.