Skip to content

Zod v3.23#3424

Merged
colinhacks merged 2 commits into
masterfrom
v3.23
Apr 21, 2024
Merged

Zod v3.23#3424
colinhacks merged 2 commits into
masterfrom
v3.23

Conversation

@colinhacks

@colinhacks colinhacks commented Apr 20, 2024

Copy link
Copy Markdown
Owner

@netlify

netlify Bot commented Apr 20, 2024

Copy link
Copy Markdown

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
Copy Markdown
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
@colinhacks colinhacks deleted the v3.23 branch April 21, 2024 22:43
morgs32 pushed a commit to morgs32/zod that referenced this pull request May 29, 2026
* Clear playground

* v3.23.0
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