Course contentsShow
TypeScript
Lesson 1292 of 1,79630. Type-Safe APIsPro lesson

Union and Discriminated Union Schemas

Use z.union() and z.discriminatedUnion() to validate data that can be one of several shapes.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.