<p dir="auto">I have the following:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// third-party.d.ts
declare module foo.bar {
  export interface IBar&lt;T&gt; {
    a: T;
  }
}"><pre class="notranslate"><span class="pl-c">// third-party.d.ts</span>
<span class="pl-k">declare</span> module <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-s1">bar</span> <span class="pl-kos">{</span>
  <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">IBar</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-c1">a</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// bar.ts
module bar {
  export interface IBar {
    a: number;
  }
}"><pre class="notranslate"><span class="pl-c">// bar.ts</span>
module <span class="pl-s1">bar</span> <span class="pl-kos">{</span>
  <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">IBar</span> <span class="pl-kos">{</span>
    <span class="pl-c1">a</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// main.ts
module foo.main {
  import IBar = foo.bar.IBar;
  import IBar2 = bar.IBar;
  export var a: IBar&lt;number&gt;;
  export var b: IBar2;
}"><pre class="notranslate"><span class="pl-c">// main.ts</span>
module <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-s1">main</span> <span class="pl-kos">{</span>
  <span class="pl-k">import</span> <span class="pl-smi">IBar</span> <span class="pl-c1">=</span> <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-s1">bar</span><span class="pl-kos">.</span><span class="pl-smi">IBar</span><span class="pl-kos">;</span>
  <span class="pl-k">import</span> <span class="pl-smi">IBar2</span> <span class="pl-c1">=</span> <span class="pl-s1">bar</span><span class="pl-kos">.</span><span class="pl-smi">IBar</span><span class="pl-kos">;</span>
  <span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-s1">a</span>: <span class="pl-smi">IBar</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
  <span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-s1">b</span>: <span class="pl-smi">IBar2</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">compiling with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tsc -d bar.ts main.ts third-party.d.ts"><pre class="notranslate"><code class="notranslate">tsc -d bar.ts main.ts third-party.d.ts
</code></pre></div>
<p dir="auto">fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="main.ts(5,17): error TS2314: Generic type 'IBar&lt;T&gt;' requires 1 type argument(s)."><pre class="notranslate"><code class="notranslate">main.ts(5,17): error TS2314: Generic type 'IBar&lt;T&gt;' requires 1 type argument(s).
</code></pre></div>
<p dir="auto">The issue appears to be because the <code class="notranslate">foo.main</code> shares the <code class="notranslate">foo</code> namespace with the third party <code class="notranslate">foo.bar</code> and cannot distinguish the thirty party namespace from the top-level <code class="notranslate">bar</code> namespace.</p>
<p dir="auto">Updating the main file to drop the imports:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module foo.main {
  export var a: foo.bar.IBar&lt;number&gt;;
  export var b: bar.IBar2;
}"><pre class="notranslate">module <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-s1">main</span> <span class="pl-kos">{</span>
  <span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-s1">a</span>: <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-s1">bar</span><span class="pl-kos">.</span><span class="pl-smi">IBar</span><span class="pl-kos">&lt;</span><span class="pl-smi">number</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
  <span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-s1">b</span>: <span class="pl-s1">bar</span><span class="pl-kos">.</span><span class="pl-smi">IBar2</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">yields this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="main.ts(5,17): error TS2305: Module 'foo.bar' has no exported member 'IBar2'"><pre class="notranslate"><code class="notranslate">main.ts(5,17): error TS2305: Module 'foo.bar' has no exported member 'IBar2'
</code></pre></div>
<p dir="auto">Is there any way to resolve the name clash? This simple example aside, you can imaging a large project which contains a module like <code class="notranslate">somecompany.utility</code>, which would prevent the use of any top-level <code class="notranslate">utility</code> module in the future.</p>
<p dir="auto">Hi,</p>
<p dir="auto"><strong>Version</strong>: VS 2015 / TS 1.5</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1106823/9182144/118545b6-3fa1-11e5-9432-220044004c2e.png"><img src="https://cloud.githubusercontent.com/assets/1106823/9182144/118545b6-3fa1-11e5-9432-220044004c2e.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">When hovering over the property <code class="notranslate">foo</code>, it would be helpful if the JSDoc <code class="notranslate">"The foo option"</code> was also displayed. At present the only way to figure out what the property represents seems to be to delete and type it again:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1106823/9182249/9d4b3650-3fa1-11e5-98a9-2825f6679fbf.png"><img src="https://cloud.githubusercontent.com/assets/1106823/9182249/9d4b3650-3fa1-11e5-98a9-2825f6679fbf.png" alt="image" style="max-width: 100%;"></a></p>