#Zod
2 posts tagged Zod. All posts
Branded types in TypeScript: keeping IDs and units apartUse branded types to stop TypeScript mixing up user IDs and order IDs, or cents and dollars: constructor functions, type guards, JSON and Zod's .brand().
Validating untrusted input at runtime with Zod 4Use Zod 4 schemas to validate request bodies and environment variables in TypeScript: z.infer, safeParse, coercion, transforms and readable error output.
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)