TypeScript
Type Narrowing & Type Guards
53 lessons in TypeScript
- Discriminated Union Narrowing in ReactCode Quiz
- Discriminated Unions in React PropsQuiz
- Narrowing InvalidationFlashcard
- Type Guards vs Type AssertionsSlides / Video
- Narrowing the unknown TypeSlides / Video
- Control Flow Analysis and Narrowing ScopeSlides / Video
- Assertion Functions with 'asserts'Slides / Video
- Exhaustiveness Checking with neverSlides / Video
- Discriminated Unions and Tagged NarrowingSlides / Video
- User-Defined Type Guards with 'is'Slides / Video
- Null and Undefined NarrowingSlides / Video
- Equality Narrowing with === and switchSlides / Video
- Truthiness NarrowingSlides / Video
- The in Operator for Property CheckingSlides / Video
- instanceof Type GuardsSlides / Video
- typeof Type GuardsSlides / Video
- What Type Narrowing IsSlides / Video
- Assertion Functions (asserts)Flashcard
- User-Defined Type Guards (is)Flashcard
- Narrowing the unknown TypeFlashcard
- Equality NarrowingFlashcard
- Control Flow Analysis NarrowingFlashcard
- Truthiness NarrowingFlashcard
- Discriminated UnionsFlashcard
- Array.isArray NarrowingFlashcard
- typeof Type GuardsFlashcard
- Non-Null Assertion Operator (!)Flashcard
- in Operator NarrowingFlashcard
- Type Assertions vs Type GuardsFlashcard
- Narrowing Out null and undefinedFlashcard
- Exhaustiveness Checking with neverFlashcard
- instanceof Type GuardsFlashcard
- Filter Callback Missing Type PredicateCode Quiz
- Helper Function Loses NarrowingCode Quiz
- typeof Cannot Detect ArraysCode Quiz
- Reassignment Resets NarrowingCode Quiz
- Non-null Assertion Hides Real BugCode Quiz
- Wrong Null Check Misses UndefinedCode Quiz
- Equality Narrowing Dead BranchCode Quiz
- Truthiness Narrowing Drops ZeroCode Quiz
- Optional Chaining Yields Possibly UndefinedCode Quiz
- Using unknown Without NarrowingCode Quiz
- Array.isArray as Type GuardQuiz
- Truthiness NarrowingQuiz
- Equality NarrowingQuiz
- Control Flow Analysis BasicsQuiz
- typeof Guards for PrimitivesQuiz
- Type Predicate Return EffectQuiz
- Non-null Assertion OperatorQuiz
- Narrowing via AssignmentQuiz
- never in Exhaustiveness CheckingQuiz
- Narrowing Literal and Union TypesQuiz
- Narrowing Loss in ClosuresQuiz