QuizNot attempted
interface vs type
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- Declaration merging (two declarations with the same name combine)
- Only interfaces merge: two
interface Window {}declarations combine, which is how libraries let you augment globals and modules - a duplicate
typeis an error. - Not unions: only type aliases can be unions.
- Not mapped/conditional types: also type-alias-only.
- Not 'extended by a class': a class can
implementseither an interface or an object-shaped type alias.