Intermediate
TypeScript
Q49 / 100
What is the difference between an "interface" and a "type" alias for object shapes?
Correct! Well done.
Incorrect.
The correct answer is B) Interfaces can be merged via declaration merging, while type aliases cannot be re-opened
B
Correct Answer
Interfaces can be merged via declaration merging, while type aliases cannot be re-opened
Explanation
Interfaces support declaration merging (multiple declarations combine), whereas a type alias with the same name causes a duplicate identifier error.
Progress
49/100