As we now know, the TypeScript compiler will automatically search through all the .d.ts files in our project to pick up declaration files. If these declaration files contain the same module name, the TypeScript compiler will merge these two declaration files and use a combined version of the module declarations.
Imagine that we have a file named MergedModule1.d.ts, containing the following definition:
declare module MergedModule { function functionA() : void; }
And we also have a second file, named MergedModule2.d.ts, that contains the following definition:
declare module MergedModule { function functionB() : void; }
Now, the TypeScript compiler will merge these two modules as if they were a single definition:
declare module MergedModule { function functionA() : void; function functionB() : void; }
This will allow both functionA and functionB...