Skip to content
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

Zod v3.23 #3424

Merged
merged 2 commits into from
Apr 21, 2024
Merged

Zod v3.23 #3424

merged 2 commits into from
Apr 21, 2024

Conversation

colinhacks
Copy link
Owner

@colinhacks colinhacks commented Apr 20, 2024

Copy link

netlify bot commented Apr 20, 2024

Deploy Preview for guileless-rolypoly-866f8a ready!

Name Link
🔨 Latest commit ade1d7d
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/662448f5263fd9000752625a
😎 Deploy Preview https://deploy-preview-3424--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@samchungy
Copy link
Contributor

Not sure if you noticed but I think I spotted a little mistake in your change log by the way.

const schema = z.discriminatedUnion("type", [
  z.object({ type: z.literal("A").optional(), value: z.number() }),
  z.object({ type: z.literal("B").nullable(), value: z.string() }),
  z.object({ type: z.literal("C").readonly(), value: z.boolean() }),
  z.object({ type: z.literal("D").readonly(), value: z.boolean() }),
  z.object({ type: z.literal("E").catch("E"), value: z.unknown() }),
]);

I think D is meant to be a branded example?

@colinhacks colinhacks merged commit 39a588a into master Apr 21, 2024
20 checks passed
@colinhacks colinhacks deleted the v3.23 branch April 21, 2024 22:43
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