Ambient declaration with an imported type in TypeScript : <p>I have a declaration file in my TypeScript project like so:</p>

<pre><code>// myapp.d.ts
declare namespace MyApp {
  interface MyThing {
    prop1: string
    prop2: number
  }
}
</code></pre>

<p>This works great and I can use this namespace anywhere in my project without having to import it.</p>

<p>I now need to import a type from a 3rd party module and use it in my ambient declaration:</p>

<pre><code>// myapp.d.ts
import {SomeType} from 'module'

declare namespace MyApp {
  interface MyThing {
    prop1: string
    prop2: number
    prop3: SomeType
  }
}
</code></pre>

<p>The compiler now complains that it can't find namespace 'MyApp', presumably because the import prevents it from being ambient.</p>

<p>Is there some easy way to retain the ambient-ness of the declaration whilst utilising 3rd-party types?</p>
