inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
414 stars 41 forks source link

Add ability to use `z.discriminatedUnion` and `z.union` in schemas #432

Closed jpwilliams closed 9 months ago

jpwilliams commented 9 months ago

Summary

Add the ability to use z.discriminatedUnion() and z.union() (as long as it's only a union of valid types).

Note that z.discriminatedUnion() will likely be deprecated in lieu of z.switch(), though this API is not yet available. See colinhacks/zod#2106.

Checklist

Related

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: e14b054fdbcdc01b0897d189143e6fb9c7421a1d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------- | ----- | | inngest | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR