TypeScript never type inference : <p>Can someone please explain me why given the following code:</p>

<pre><code>let f = () =&gt; {
    throw new Error("Should never get here");
}

let g = function() { 
    throw new Error("Should never get here");
}

function h() { 
    throw new Error("Should never get here");
}
</code></pre>

<p>The following types are inferred:</p>

<ul>
<li><code>f</code> is <code>() =&gt; never</code></li>
<li><code>g</code> is <code>() =&gt; never</code></li>
<li><code>h</code> is <code>() =&gt; void</code></li>
</ul>

<p>I would expect the type of <code>h</code> to be <code>() =&gt; never</code> as well.</p>

<p>Thanks!</p>
