TypeScript
Type Narrowing & Type Guards
51 lessons in TypeScript
- 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
- in Operator NarrowingFlashcard
- Narrowing Out null and undefinedFlashcard
- Exhaustiveness Checking with neverFlashcard
- Discriminated UnionsFlashcard
- instanceof Type GuardsFlashcard
- Control Flow Analysis NarrowingFlashcard
- Assertion Functions (asserts)Flashcard
- Array.isArray NarrowingFlashcard
- User-Defined Type Guards (is)Flashcard
- Type Assertions vs Type GuardsFlashcard
- Equality NarrowingFlashcard
- typeof Type GuardsFlashcard
- Truthiness NarrowingFlashcard
- Non-Null Assertion Operator (!)Flashcard
- Narrowing the unknown TypeFlashcard
- Filter Callback Missing Type PredicateCode Quiz
- Helper Function Loses NarrowingCode Quiz
- Wrong Null Check Misses UndefinedCode Quiz
- Equality Narrowing Dead BranchCode Quiz
- Using unknown Without NarrowingCode Quiz
- Truthiness Narrowing Drops ZeroCode Quiz
- typeof Cannot Detect ArraysCode Quiz
- Optional Chaining Yields Possibly UndefinedCode Quiz
- Reassignment Resets NarrowingCode Quiz
- Non-null Assertion Hides Real BugCode Quiz
- typeof Guards for PrimitivesQuiz
- Array.isArray as Type GuardQuiz
- Narrowing Loss in ClosuresQuiz
- Narrowing Literal and Union TypesQuiz
- never in Exhaustiveness CheckingQuiz
- Narrowing via AssignmentQuiz
- Non-null Assertion OperatorQuiz
- Type Predicate Return EffectQuiz
- Control Flow Analysis BasicsQuiz
- Equality NarrowingQuiz
- Truthiness NarrowingQuiz