DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
TypeScript Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
hard
TypeScript
What real, practical benefit does the never-based exhaustiveness pattern provide in a switch statement over a discriminated union?
A
It makes the switch statement run faster
B
If a new case is added to the union later and not handled in the switch, the pattern produces a compile error catching the omission
C
It automatically generates the missing case's logic
D
It has no practical benefit, it's purely stylistic
Check Answer