Explore Library
TypeScriptType Narrowing & Type Guards

51 items

1

Narrowing Invalidation

Flashcard
2

Type Guards vs Type Assertions

Slides / Video
3

Narrowing the unknown Type

Slides / Video
4

Control Flow Analysis and Narrowing Scope

Slides / Video
5

Assertion Functions with 'asserts'

Slides / Video
6

Exhaustiveness Checking with never

Slides / Video
7

Discriminated Unions and Tagged Narrowing

Slides / Video
8

User-Defined Type Guards with 'is'

Slides / Video
9

Null and Undefined Narrowing

Slides / Video
10

Equality Narrowing with === and switch

Slides / Video
11

Truthiness Narrowing

Slides / Video
12

The in Operator for Property Checking

Slides / Video
13

instanceof Type Guards

Slides / Video
14

typeof Type Guards

Slides / Video
15

What Type Narrowing Is

Slides / Video
16

in Operator Narrowing

Flashcard
17

Narrowing Out null and undefined

Flashcard
18

Exhaustiveness Checking with never

Flashcard
19

Discriminated Unions

Flashcard
20

instanceof Type Guards

Flashcard
21

Control Flow Analysis Narrowing

Flashcard
22

Assertion Functions (asserts)

Flashcard
23

Array.isArray Narrowing

Flashcard
24

User-Defined Type Guards (is)

Flashcard
25

Type Assertions vs Type Guards

Flashcard
26

Equality Narrowing

Flashcard
27

typeof Type Guards

Flashcard
28

Truthiness Narrowing

Flashcard
29

Non-Null Assertion Operator (!)

Flashcard
30

Narrowing the unknown Type

Flashcard
31

Filter Callback Missing Type Predicate

Code Quiz
32

Helper Function Loses Narrowing

Code Quiz
33

Wrong Null Check Misses Undefined

Code Quiz
34

Equality Narrowing Dead Branch

Code Quiz
35

Using unknown Without Narrowing

Code Quiz
36

Truthiness Narrowing Drops Zero

Code Quiz
37

typeof Cannot Detect Arrays

Code Quiz
38

Optional Chaining Yields Possibly Undefined

Code Quiz
39

Reassignment Resets Narrowing

Code Quiz
40

Non-null Assertion Hides Real Bug

Code Quiz
41

typeof Guards for Primitives

Quiz
42

Array.isArray as Type Guard

Quiz
43

Narrowing Loss in Closures

Quiz
44

Narrowing Literal and Union Types

Quiz
45

never in Exhaustiveness Checking

Quiz
46

Narrowing via Assignment

Quiz
47

Non-null Assertion Operator

Quiz
48

Type Predicate Return Effect

Quiz
49

Control Flow Analysis Basics

Quiz
50

Equality Narrowing

Quiz
51

Truthiness Narrowing

Quiz
Slides / VideoIntermediate

Equality Narrowing with === and switch

Learn how TypeScript narrows types when you compare values with === or branch on switch cases.

Slide 1
1 / 6