Skip to content

fix: discriminated union for Zod v4 mini #784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eliocapella
Copy link

Context

When trying out the new Zod v4 mini I noticed that discriminated unions aren't supported.

Changes

  • Adding discriminated unions to the tests
  • Using the current error on invalid union if the errors array is empty

@eliocapella eliocapella changed the title fix: discriminated union for zod fix: discriminated union for Zod v4 mini Jun 19, 2025
@eliocapella
Copy link
Author

eliocapella commented Jun 19, 2025

I'm unable to get bun to work correctly in my computer, it just keeps loading forever when trying to run the tests
Screenshot 2025-06-19 at 10 20 06

@lefuncq
Copy link

lefuncq commented Jun 27, 2025

Hey, any plans to release this fix?

@eliocapella eliocapella marked this pull request as ready for review June 30, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants