Concept: Declaration Merging
Concept Check Medium
Question
What is declaration merging in TypeScript?
Hint
What happens if you declare interface Foo twice?
Explanation
Declaration merging is a feature of interfaces where multiple declarations with the same name are automatically combined into a single interface. This is unique to interfaces — type aliases cannot merge. It is commonly used to extend existing interfaces, including built-in ones like Window, or to split large interfaces across files.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.