Escaping the Phantom Zone of Insecure Data: Build Safer Applications with zod
summary
Introduces the npm package zod, a runtime validation library with excellent TypeScript support that generates types from schemas so runtime-checked data and TypeScript types stay in sync. Demonstrates zod’s API and shows practical frontend and backend examples of using zod to validate incoming data, improve safety compared with plain TypeScript, and integrate into development workflows.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:31Data validation at edges
- 2:21JavaScript typing pitfalls
- 4:51TypeScript static typing
- 6:43Inferring vs explicit types
- 7:47Discriminated unions
- 9:59What is Zod
- 10:40Zod API basics
- 13:52Zod discriminated unions
- 15:58Types with Zod
- 16:40Zod API flexibility
- 17:04Zod with React Hook Form
- 18:10API response validation
- 19:12Better UX with Zod
- 21:22Validating env vars with Zod
- 22:48Zod for Node.js
- 24:54Express middleware
- 25:57Zod JavaScript support
- 27:04Zod vs Yup vs AJV
- 29:55When to choose Zod
- 30:16Summary
related talks
45mBuild Fully Type Safe Projects with TypeScript and Zod
23mType-safe forms for React using Zod
21mKeep alive your typescript definitions using Zod
30mWith Zod, Fight Any-gration at Your Borders
15mTypescript. Runtime. And In Between.
21mBeyond Type Checking Building Bulletproof TypseScript Applications
15mValidate HTTP request with HttpClient & Zod - Lightning talk
21mThe long-tail of type safety
