<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dpsthree/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dpsthree">@dpsthree</a> on April 12, 2016 15:52</em></p>
<p dir="auto">I have a folder that contains a Typescript Client and Typescript Node Server subfolder. There is a third top level directory, common, where we store our isomorphic Typescript code.</p>
<p dir="auto">In order for a rename to work across files a tsconfig.json file is needed that includes the top module of your project and all submodules must be imported properly.</p>
<p dir="auto">When attempting to perform a rename of a class defined in the common folder the action is only applied to one of the two typescript projects. Adding a top level tsconfig.json that points to the starting modules of both projects did not change this behavior.</p>
<p dir="auto">Ideally, a refactor would follow all tsconfig.json module trees as needed.</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="147795086" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5194" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5194/hovercard" href="https://github.com/microsoft/vscode/issues/5194">microsoft/vscode#5194</a></em></p>
<p dir="auto">Global operations are currently only done on the first project for a file, namely:</p>
<ul dir="auto">
<li>rename</li>
<li>find all references</li>
<li>navigate to</li>
</ul>
<p dir="auto">For instance if you have three files (a.ts, b.ts, and c.ts) open in the editor, listed below, we create three projects, Project 1 (a.ts), Project 2 (a.ts, b.ts), Project 3 (a.ts, c.ts).</p>
<p dir="auto">a.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var x;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">x</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">b.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;a.ts&quot; /&gt;
x ++;"><pre class="notranslate"><span class="pl-c">/// &lt;reference path="a.ts" /&gt;</span>
<span class="pl-s1">x</span> <span class="pl-c1">++</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">c.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;a.ts&quot; /&gt;
x = x + 2;"><pre class="notranslate"><span class="pl-c">/// &lt;reference path="a.ts" /&gt;</span>
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-c1">2</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Calling rename on x, in a,ts will only rename it in a.ts and not in b.ts or c.ts as well. if renaming in b.ts it will not rename in c.ts, and vice versa.</p>