what's this union type doing(Zod)?
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.
0 Replies