<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/louy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/louy">@louy</a> on December 26, 2015 11:41</em></p>
<p dir="auto">There's a very annoying issue when hitting "format code" in a TS file. Here's an example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[{
}, {
}]
// or
fn({
}, {
})"><pre class="notranslate"><span class="pl-kos">[</span><span class="pl-kos">{</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span><span class="pl-kos">]</span>
<span class="pl-c">// or</span>
<span class="pl-en">fn</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">becomes:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
[{
}, {
  }]
// or
fn({
}, {
  })"><pre class="notranslate"><span class="pl-kos">[</span><span class="pl-kos">{</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
  <span class="pl-kos">}</span><span class="pl-kos">]</span>
<span class="pl-c">// or</span>
<span class="pl-en">fn</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">This gets really annoying when you have large nested objects containing things like functions etc...</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="123925824" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/1661" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/1661/hovercard" href="https://github.com/microsoft/vscode/issues/1661">microsoft/vscode#1661</a></em></p>
<p dir="auto">A number of times recently I've run into problems when I search for a function in TypeScript, deleted it and find that I'm not getting errors for the missing references. Turns out it found the generated .JS not the source. This is VS2015 fully updated.</p>
<p dir="auto">How do I prevent it from stumbling into the .JS code.</p>
<p dir="auto">Or is this a bug one one of the addins for Visual Studio? If so which one?</p>