Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Codecademy

Learn Intermediate TypeScript: Type Narrowing

via Codecademy

Overview

Learn advanced techniques to narrow complex types in TypeScript. Discover TypeScript’s power inference through type guards and type narrowing.

Master the art of type narrowing in TypeScript with this intermediate course. You'll learn how TypeScript does type narrowing at runtime, create user-defined type guards, and utilize appropriate operators such as `typeof` and `in` when writing type guards. With hands-on exercises and practical examples, you'll gain a deep understanding of type narrowing techniques and how they can help you write cleaner, more efficient code.


* Describe how TypeScript does type narrowing at runtime

* Check variable types with a type guard

* Utilize the `typeof` and `in` operators when writing type guards

Syllabus

  • Intermediate Type Narrowing: Learn about Intermediate Type Narrowing
    • Lesson: Intermediate Type Narrowing
    • Project: Narrow Space Mining
    • Quiz: Intermediate Type Narrowing
    • Informational: TypeScript Type Narrowing Next Steps

Taught by

Jiwon Shin

Reviews

Start your review of Learn Intermediate TypeScript: Type Narrowing

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.