title: Why does importing a TypeScript module disallow existing module extension?
body: <p>I have a TypeScript external definition file (foo.d.ts):</p>
  
  <pre><code>declare module foo {
      export class bar {
      }
  }
  </code></pre>
  
  <p>Then I use it like this (in baz.ts):</p>
  
  <pre><code>/// &lt;reference path="foo.d.ts" /&gt;
  module foo {
      class baz extends bar {
      }
  }
  </code></pre>
  
  <p>So far so good. But when I import some other TypeScript file compiled as an AMD module compilation breaks:</p>
  
  <pre><code>module foo {
      class baz extends bar { // Error: could not find symbol "bar"
      }
  }
  
  import T1 = module("test1"); // Removing this line resolves the compilation error
  </code></pre>
  
  <p>The AMD file being imported is a simple as:</p>
  
  <pre><code>export var NAME = "NAME";
  </code></pre>
  
  <p>Does anybody know if this is intended? Why does <code>import</code> break my code in such a way?</p>