title: Typescript error "An export assignment cannot be used in a module with other exported elements." while extending typescript definitions
body: <p>I have downloaded the type definition of a module, let's say <strong>ModuleA</strong>, from <code>@types/module-a</code>.</p>
  
  <p>The <strong>module-a.d.ts</strong> file looks like</p>
  
  <pre><code>declare module "module-a" {
    export = moda;
  }
  
  declare namespace moda {
    interface MODAPromise&lt;T&gt; {
      isResolved(): boolean;
      ....;
    }
  }
  </code></pre>
  
  <p>Now, in my application, I find that I need to extend these types with some additional specifications.</p>
  
  <p>Following advice received earlier, I build in my src directory a file <strong>module-a.augmented.d.ts</strong> such at this</p>
  
  <pre><code>declare module "module-a" {
      export interface MODAPromise {
          myNewProperty: any;
      }
  }
  </code></pre>
  
  <p>If I do so though, TypeScript signals an error <strong><em>"An export assignment cannot be used in a module with other exported elements."</em></strong>  in line</p>
  
  <pre><code>export = moda;
  </code></pre>
  
  <p>of <strong>module-a.d.ts</strong>. 
  Is there a way to extend such type of declaration without having to touch the original <strong>module-a.d.ts</strong> file?</p>