Skip to main content

Quiz: Advanced Patterns

Test what you learned in this lesson before moving on.

Lesson Quiz

Pass with 80% to complete this lesson.

1. What is the 'discriminant' in a discriminated union?

2. What does a type predicate like `pet is Fish` do in a type guard function?

3. Why assign an unhandled case to a `never` variable in a switch statement?