[GitHub Trending] colinhacks/zod
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
Zod is well-established but still highly actionable for TypeScript validation in any stack.
Zod 3.x introduces ahead-of-time (AOT) compilation via `z.compile(schema)`, delivering up to 9x speedups on complex schemas by removing per-node dispatch and allocation. The 2kb zero-dependency library remains TypeScript-first, offering immutable APIs, JSON Schema conversion, and a global compilation mode via `import "zod/compile"` that automatically compiles schemas constructed after import. Async refinements and transforms are excluded from compilation, and invalid inputs fall back to the regular parser to preserve identical error reporting.
colinhacks