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
medium
TypeScript
What's a concrete, non-stylistic reason to prefer a union of string literals over an enum for new code?
A
Unions are always faster to type-check
B
A union of literals is fully erased at compile time (zero runtime footprint), while enum generates an actual runtime object
C
Enums cannot express more than 2 values
D
There is no real difference, it's purely a matter of taste
Check Answer