TypeScript is super powerful, but there is only one problem. It runs at compile time. So how can you get type safety both at compile and runtime? Well, the solution has a name, and it is Zod. Zod is a TypeScript-first schema validation library with static type inference. It helps you validate your data against your schema at runtime while also inferring types for you. In this video, you will learn everything from A to Z, and we will also look at real-life examples.
📸 Screen Recording Software: https://dub.sh/eDa47SO
🔒 Get started with Kinde: https://dub.sh/xeU8r3v
🚀 Checkout Cal for Free: https://dub.sh/FAuffAy
👨🏻💻 GitHub Repository: https://github.com/ski043/master-zod-yt
🌍 My Website: https://janmarshal.com/
✅ Follow me on X: https://x.com/janmarshaldev
📧 Business ONLY: [email protected]
Timestamps:
00:00 Intro
00:12 Why you need Zod
03:38 Compile time vs run time
04:46 Intro to Zod
07:00 Create your first zod schema
17:00 Validate your data finally
22:00 .parse() vs .safeParse()
24:00 Real world example