Syllabus

  1. 01Type NarrowingUse the checks you already write in JavaScript, typeof (all eight results), equality, the in operator, if...else and early returns, as type guards that tell TypeScript exactly which member of a union you're working with.7 lessons
    1. 01Type Guards
    2. 02What typeof Can Tell You
    3. 03Using in as a Type Guard
    4. 04Narrowing with else
    5. 05Narrowing After a Guard
    6. 06Type Narrowing Quiz
    7. 07Project: Smart Home Commands