Discriminated union handle
How Do I handle Input type if its discriminated union??
TS2339: Property 'id' does not exist on type ...
TS2339: Property 'query' does not exist on type ...
4 Replies
Same way as normal in typescript
Documentation - Narrowing
Understand how TypeScript uses JavaScript knowledge to reduce the amount of type syntax in your projects.
Type also needs to be a z.literal, not sure what you're doing there
Thx got it.