title: Type '{}' is not assignable to type 'never'
body: <p>Recently I have been having issue with some strange issue in typescript.
  I'm usually developing the app on linux (manjaro), but when I tried the app on windows 10, I get this:</p>
  <p><code>Type '{}' is not assignable to type 'never'. ts(2322)</code></p>
  <p>which happens in code (in components <code>UserForm</code> and <code>LoginForm</code>):</p>
  <pre><code>&lt;div className=&quot;dropdown-menu dropdown-menu-right&quot; style={{ width: 320 }} onClick={handleFormOnClick}&gt;
    {authenticated ? &lt;UserForm /&gt; : &lt;LoginForm /&gt;}
  &lt;/div&gt;
  </code></pre>
  <p>The problem I have with this type error is not only that the error doesn't make sense to me, as both components are exported like many other components in my app are, but also the fact that on linux, I don't have any error or warning in the entire file.</p>
  <p>Both windows and linux version are the same version (pulled from git).
  Typescript version is 4.4.4 for both of them.</p>
  <p>Both components are classes extending <code>React.PureComponent</code> exported as
  <code>compose(withConnect)(LoginForm)</code> (I also tried to just use <code>withConnect(LoginForm)</code> with no luck)
  I even tried to recast them as <code>JSX.Element</code> (<code>(&lt;UserForm /&gt;) as JSX.Element</code>)</p>
  <p>I have tried to run the code on 2 separate machines with windows 10 and both are having this error. Am I missing something? Why does it work on linux if there is something wrong with it?</p>
  <p>Node version: 16.13.0</p>