<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.0-beta (Visual Studio 2015 Community)</p>
<p dir="auto"><strong>Code</strong></p>
<p dir="auto">According to <a href="http://stackoverflow.com/questions/21803257/how-is-visual-studios-implicit-referencing-of-typescript-files-supposed-to-work" rel="nofollow">this StackOverflow question</a>, I have checked and double-checked that all files in question have been set, unset, and reset to <code class="notranslate">Build Action: TypeScriptCompile</code>. Code is arranged as follows:</p>
<blockquote>
<p dir="auto">src<br>
| - modules<br>
| | - config.d.ts<br>
| | - config.ts</p>
</blockquote>
<p dir="auto"><strong>config.d.ts</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Configuration {
  debug?: boolean;
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Configuration</span> <span class="pl-kos">{</span>
  <span class="pl-c1">debug</span>?: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>config.ts</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export var config: Configuration = { // &quot;Cannot find name 'Configuration'.&quot;
  debug: true
};"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-s1">config</span>: <span class="pl-smi">Configuration</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c">// "Cannot find name 'Configuration'."</span>
  <span class="pl-c1">debug</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>tsconfig.json (for reference)</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;compilerOptions&quot;: {
    &quot;rootDir&quot;: &quot;src/&quot;,
    &quot;outDir&quot;: &quot;dist/&quot;,
    &quot;target&quot;: &quot;es5&quot;,
    &quot;module&quot;: &quot;system&quot;,
    &quot;diagnostics&quot;: true,
    &quot;declaration&quot;: false,
    &quot;noImplicitAny&quot;: false,
    &quot;removeComments&quot;: true,
    &quot;noLib&quot;: true,
    &quot;emitDecoratorMetadata&quot;: true,
    &quot;experimentalDecorators&quot;: true
  },
  &quot;exclude&quot;: [
    &quot;typings/main.d.ts&quot;,
    &quot;typings/main&quot;,
    &quot;node_modules&quot;
  ]
}"><pre class="notranslate">{
  <span class="pl-ent">"compilerOptions"</span>: {
    <span class="pl-ent">"rootDir"</span>: <span class="pl-s"><span class="pl-pds">"</span>src/<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"outDir"</span>: <span class="pl-s"><span class="pl-pds">"</span>dist/<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>es5<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>system<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"diagnostics"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"declaration"</span>: <span class="pl-c1">false</span>,
    <span class="pl-ent">"noImplicitAny"</span>: <span class="pl-c1">false</span>,
    <span class="pl-ent">"removeComments"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"noLib"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"emitDecoratorMetadata"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"experimentalDecorators"</span>: <span class="pl-c1">true</span>
  },
  <span class="pl-ent">"exclude"</span>: [
    <span class="pl-s"><span class="pl-pds">"</span>typings/main.d.ts<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>typings/main<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
  ]
}</pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Visual Studio should discover the <code class="notranslate">d.ts</code> file and expose the interface to all other TypeScript modules.</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Visual Studio does not expose the interface to any other module unless the reference is explicitly declared using <code class="notranslate">/// &lt;reference path="config.d.ts" /&gt;</code>.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.9</p>
<p dir="auto">To reproduce use VSCode from Insider Channel (<a href="https://code.visualstudio.com/Download#insiders" rel="nofollow">https://code.visualstudio.com/Download#insiders</a>)</p>
<ul dir="auto">
<li>create workspace</li>
<li>create tsconfig.json with content</li>
</ul>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    &quot;compilerOptions&quot;: {
        &quot;module&quot;: &quot;commonjs&quot;
    }
}"><pre class="notranslate">{
    <span class="pl-ent">"compilerOptions"</span>: {
        <span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>commonjs<span class="pl-pds">"</span></span>
    }
}</pre></div>
<ul dir="auto">
<li>create test.ts with content</li>
</ul>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {   
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>   
<span class="pl-kos">}</span></pre></div>
<ul dir="auto">
<li>create folder libs</li>
<li>create folder libs\superLib</li>
<li>create file libs\superLib\lib.d.ts with content</li>
</ul>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function foo();"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-s1">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<ul dir="auto">
<li>start VSCode</li>
<li>open test.ts</li>
<li>try to rename libs to libs2</li>
</ul>
<p dir="auto">Observer: you can't the directory is locked.</p>
<ul dir="auto">
<li>Use for example handle.exe from SysInternals or a process explorer to check who is holding a lock on the .\libs directory. It is the tsserver.</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1931590/14202545/db08ec70-f7f8-11e5-83dc-d40104f63efc.png"><img src="https://cloud.githubusercontent.com/assets/1931590/14202545/db08ec70-f7f8-11e5-83dc-d40104f63efc.png" alt="capture" style="max-width: 100%;"></a></p>