Typescript. Runtime. And In Between.
summary
Typescript erases types at transpile time so compile-time checks don’t prevent runtime shape errors; the talk shows the transpiler producing an AST and emitting JS + .d.ts files. Zod is used to parse and validate runtime values (parse throws on mismatch, safeParse returns { success, data }), to validate env vars via extended process types, and to create nominal-like types with zod's brand creates nominal types so functions reject mismatched primitives.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:44TypeScript's limitations
- 3:55Runtime vs type space
- 7:52Zod for runtime validation
- 11:23Nominal typing with Zod
- 14:14Summary and Q&A
related talks
49mTypescript. Runtime. And in Between.
21mKeep alive your typescript definitions using Zod
31mEscaping the Phantom Zone of Insecure Data: Build Safer Applications with zod
45mBuild Fully Type Safe Projects with TypeScript and Zod
21mBeyond Type Checking Building Bulletproof TypseScript Applications
23mType-safe forms for React using Zod
21mThe long-tail of type safety
30mWith Zod, Fight Any-gration at Your Borders
