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