T
tRPC

❓-help

what's this union type doing(Zod)?

PMPablo M1/17/2024
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.

Looking for more? Join the community!