TypeScript only checks types at compile time. And that means that, invalid data, that doesn't have the fields we think are required, can still break our applications. Learn how to use Zod, Yup, and Joi to fix this problem and go even further to check the contents of the fields at runtime.
Code: github.com/jherr/runtime-type...
Zod: github.com/colinhacks/zod
Yup: github.com/jquense/yup
Joi: joi.dev/api/?v=17.4.2
00:00 Introduction
00:40 Project setup
03:32 The runtime problem
05:35 Programming defensively
06:14 Using Zod
10:25 Using Yup
12:15 Using Joi
15:00 Outroduction
👉 What's my theme? Night Wolf [black]
👉 What's that font? MonoLisa
👉 Jack is also on the React Round Up podcast: devchat.tv/podcasts/react-rou...
👉 Don't forget to subscribe to this channel for more updates: bit.ly/2E7drfJ
👉 Discord server signup: / discord
💢 Watch our other videos:
💟 Hacking your Github contribution graph: • Hacking Your Github Co...
💟 More Typescript videos: • JavaScript to TypeScri...
Thank you for watching this video, click the "SUBSCRIBE" button to stay connected with this channel.
#typescript #joi #yup #zod
Негізгі бет Ғылым және технология Fixing TypeScript's Blindspot: Runtime Typechecking
Пікірлер: 104