<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.2</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function whatever (idA, idB) {
    [idA, idB] = [idB, idA];

    return true; 
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">whatever</span> <span class="pl-kos">(</span><span class="pl-s1">idA</span><span class="pl-kos">,</span> <span class="pl-s1">idB</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-kos">[</span><span class="pl-s1">idA</span><span class="pl-kos">,</span> <span class="pl-s1">idB</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s1">idB</span><span class="pl-kos">,</span> <span class="pl-s1">idA</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

    <span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> 
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function whatever(idA, idB) {
    var _a;
    _a = [idB, idA], idA = _a[0], idB = _a[1];
    return true;
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">whatever</span><span class="pl-kos">(</span><span class="pl-s1">idA</span><span class="pl-kos">,</span> <span class="pl-s1">idB</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-s1">_a</span><span class="pl-kos">;</span>
    <span class="pl-s1">_a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s1">idB</span><span class="pl-kos">,</span> <span class="pl-s1">idA</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">idA</span> <span class="pl-c1">=</span> <span class="pl-s1">_a</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">idB</span> <span class="pl-c1">=</span> <span class="pl-s1">_a</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Actual behavior:</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function whatever(idA, idB) {
    _a = [idB, idA], idA = _a[0], idB = _a[1];
    return true;
    var _a;
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">whatever</span><span class="pl-kos">(</span><span class="pl-s1">idA</span><span class="pl-kos">,</span> <span class="pl-s1">idB</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">_a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s1">idB</span><span class="pl-kos">,</span> <span class="pl-s1">idA</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">idA</span> <span class="pl-c1">=</span> <span class="pl-s1">_a</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">idB</span> <span class="pl-c1">=</span> <span class="pl-s1">_a</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
    <span class="pl-k">var</span> <span class="pl-s1">_a</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Thanks to variable hoisting, there is no functional problem here. However, I consider the compiled code unintuitive.</p>
<p dir="auto">In addition, using Istanbul for code coverage highlights the <code class="notranslate">var _a;</code> declaration as not covered.</p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/admmasters/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/admmasters">@admmasters</a> on April 5, 2016 13:34</em></p>
<ul dir="auto">
<li>VSCode Version: Version 0.10.14-insider (0.10.14-insider)</li>
<li>OS Version: OSX 10.11.4</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Cmd+Click on a Component in JSX (also JS).</li>
<li>VSCode jumps to the import and not the file itself.</li>
</ol>
<p dir="auto">Expected:<br>
VSCode should just jump to the file referenced in the import as its smart enough to know the specific import.</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="145990871" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/4964" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/4964/hovercard" href="https://github.com/microsoft/vscode/issues/4964">microsoft/vscode#4964</a></em></p>