Lesson 22 of 56
TypescriptDeclaration Merging & Ambient Declarations
20 minutes
Course progress39%
Declaration Merging
When you declare the same identifier multiple times, TypeScript merges the definitions.
interface Window { foo: string; }
interface Window { bar: number; }
// Window now has both foo and bar