Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Type Predicates Solve This Common TypeScript Error

55.7K views on YouTube

TypeScript Simplified Course: https://courses.webdevsimplified.com/typescript-simplified/?utm_source=youtube&utm_medium=video-description&utm_term=video-id-Wksz1DnJ2VM

Type predicates are an interesting feature in TypeScript since they cover a very niche use case that can cause type errors if you are not aware of this solution.

📚 Materials/References:

TypeScript Simplified Course: https://courses.webdevsimplified.com/typescript-simplified/?utm_source=youtube&utm_medium=video-description&utm_term=video-id-Wksz1DnJ2VM

🌎 Find Me Here:

My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified

⏱️ Timestamps:

00:00 – Introduction
00:17 – The Problem
02:12 – Type Predicate Basics
03:15 – Type Predicate Problems

#TypeScript #WDS #TypePredicate