Composing Schemas to Include ID in User DTO
How can I compose schemas? I have this:
and my problem is when I use this I only get back
Is there some simple way to do schema composition? In Zod I can just do
and my problem is when I use this I only get back
{name: "..."} (id is stripped) even though this compiles:Is there some simple way to do schema composition? In Zod I can just do
A.and(B) or A.extend({ ... }. What's the equivalent in schema?