here%0A%20%20%7D%0A%7D">Try</a></pre></p>
<h2 id="narrowing"><a href="#narrowing">Narrowing</h2></a>
<p>Narrowing is the removal of types from a union. Control flow starts
from the <em>declared type</em> of a variable and maintains a <em>computed type</em>
that narrows as control flow encounters predicates and other uses that
prove facts about the type.</p>
<p>The declared type of a variable is the one it's declared with. For
<code>let x: number | undefined</code>, that's <code>number | undefined</code>. Th