title: Module name overlapping issue in TypeScript
body: <p>I am not sure if this is supported or not but I have a scenario where in my d.ts file I want to have the following declarations:</p>
  
  <pre><code>declare module final {
      export class Test {
  
      }
  }
  
  declare module root {
      module final {
          export class MainClass extends final.Test {
  
          }
      }
  }
  </code></pre>
  
  <p>And the issue I having is that TypeScript "Property 'Test' does not exist on type 'typeof final'" for the <code>extends final.Test</code> part.</p>
  
  <p>So we are having a module name overlapping issue, is that resolvable without the need to make the names unique?</p>