zod
https://github.com/colinhacks/zod
TypeScript
TypeScript-first schema validation with static type inference
Triage Issues!
When you volunteer to triage issues, you'll receive an email each day with a link to an open issue that needs help in this project. You'll also receive instructions on how to triage issues.
Triage Docs!
Receive a documented method or class from your favorite GitHub repos in your inbox every day. If you're really pro, receive undocumented methods or classes and supercharge your commit history.
TypeScript not yet supported2 Subscribers
Add a CodeTriage badge to zod
Help out
- Issues
- fix: cascade inner field defaults through .default({}) on objects
- fix: discriminatedUnion encode() with codec discriminator
- feat: add .invert() method to ZodCodec
- .default({}) on objects should cascade inner field defaults
- docs: update z.custom example for v4 compatibility
- Schema instances have ~91 own properties → dictionary mode → ~24x slower property access vs Zod 3
- fix: apply description and default metadata to enum, const, and not schemas in fromJSONSchema
- fix: strip redundant id from $defs entries in toJSONSchema
- .refine with when causes self-reference problem
- Perf: inline field-level validation in generateFastpass (JIT) for further speedups
- Docs
- TypeScript not yet supported