<p dir="auto"><a href="https://github.com/Microsoft/TypeScript/blob/738b26f065a4d859c19b4c417b359baf1d74900a/doc/spec.md#4193-the--------and--operators">To quote 4.19.1 of the spec</a>:</p>
<blockquote>
<h3 dir="auto"><section name="user-content-4.19.3">4.19.3 The &lt;, &gt;, &lt;=, &gt;=, ==, !=, ===, and !== operators</section></h3>
<p dir="auto">These operators require one or both of the operand types to be assignable to the other. The result is always of the Boolean primitive type.</p>
<table role="table">
<thead>
<tr>
<th align="center"></th>
<th align="center">Any</th>
<th align="center">Boolean</th>
<th align="center">Number</th>
<th align="center">String</th>
<th align="center">Other</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">Any</td>
<td align="center">Boolean</td>
<td align="center">Boolean</td>
<td align="center">Boolean</td>
<td align="center">Boolean</td>
<td align="center">Boolean</td>
</tr>
<tr>
<td align="center">Boolean</td>
<td align="center">Boolean</td>
<td align="center">Boolean</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center">Number</td>
<td align="center">Boolean</td>
<td align="center"></td>
<td align="center">Boolean</td>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center">String</td>
<td align="center">Boolean</td>
<td align="center"></td>
<td align="center"></td>
<td align="center">Boolean</td>
<td align="center"></td>
</tr>
<tr>
<td align="center">Other</td>
<td align="center">Boolean</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center">Boolean</td>
</tr>
</tbody>
</table>
</blockquote>
<p dir="auto">This has probably unintended consequences in the case of union types:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var x: string | number = &quot;hello&quot;;
var y: number = 10;
var z: string | number = -1;

if (x &lt; y &amp;&amp; x &lt;= z) {
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">x</span>: <span class="pl-smi">string</span> <span class="pl-c1">|</span> <span class="pl-smi">number</span> <span class="pl-c1">=</span> <span class="pl-s">"hello"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">y</span>: <span class="pl-smi">number</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">z</span>: <span class="pl-smi">string</span> <span class="pl-c1">|</span> <span class="pl-smi">number</span> <span class="pl-c1">=</span> <span class="pl-c1">-</span><span class="pl-c1">1</span><span class="pl-kos">;</span>

<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">x</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">y</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">x</span> <span class="pl-c1">&lt;=</span> <span class="pl-s1">z</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The question is: is this still desirable behavior?</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ahejlsberg/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ahejlsberg">@ahejlsberg</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RyanCavanaugh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RyanCavanaugh">@RyanCavanaugh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/danquirk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/danquirk">@danquirk</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mhegazy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mhegazy">@mhegazy</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JsonFreeman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JsonFreeman">@JsonFreeman</a></p>
<p dir="auto"><strong>TypeScript Version:</strong><br>
1.8.10</p>
<p dir="auto">Now that VS Code can nicely log the traffic to the tsserver in an output window a failed request should return a stack trace if the request failed because of an exception. This would ease tracking down problem.</p>
<p dir="auto">The TS team could also consider setting up an AppInsight end point for logging. The TS extension in VS Code could then log telemetry data to that end point.</p>