<ul dir="auto">
<li>VSCode Version: 1.1.1</li>
<li>OS Version: OSX 10.11.4</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>Insert the following TypeScript code into the editor:</li>
</ol>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var a = true ? true : `;`;
var i;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span> ? <span class="pl-c1">true</span> : <span class="pl-s">`;`</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">i</span><span class="pl-kos">;</span></pre></div>
<ol dir="auto">
<li>Observe that <code class="notranslate">var i;</code> is colored as if it were part of the template string (in VSCode, and on GitHub!).</li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1141042/15455483/747275dc-2023-11e6-9f54-9558ebef7bbc.png"><img width="290" alt="tsbug" src="https://cloud.githubusercontent.com/assets/1141042/15455483/747275dc-2023-11e6-9f54-9558ebef7bbc.png" style="max-width: 100%;"></a></p>
<p dir="auto">Removing any part of the first line prevents the bug. It only appears to occur when combining variable assignment, the ternary operator, and a template string containing a semicolon (<code class="notranslate">;</code>).</p>
<p dir="auto">Further Info:</p>
<p dir="auto">A single occurrence of this bug can derail syntax highlighting for the rest of the file, since template strings are multi-line. Template strings with semicolons can be a common occurrence for projects that generate JavaScript as output, and ternaries are a common case when wanting to handle a slight variation in output.</p>
<ul dir="auto">
<li>VSCode Version: latest</li>
<li>OS Version:OS X El Capitan</li>
</ul>
<p dir="auto">Steps to Reproduce:</p>
<ol dir="auto">
<li>create a file "ball.ts" that has a class "Ball"</li>
<li>create a new file in the file explorer pane</li>
<li>paste the whole code of ball.ts into the new file</li>
<li>now type your new class name in the new file, for example "Paddle"</li>
</ol>
<p dir="auto">result:</p>
<ul dir="auto">
<li>the file name of your new file in the explorer keeps changing to "ball-1.ts".</li>
<li>every time you rename that file to "paddle.ts", VS Code creates a new "ball-2.ts" and so forth.</li>
<li>even if you manage to get rid of all the redundant files and you end up with one paddle.ts that has a "Paddle" class, VS Code still keeps complaining that you have two Ball classes.</li>
<li>the only way to fix this is quit VS Code and restart.</li>
</ul>