title: How to export React class component with proper type
body: <p>I've problem with exporting React class component and use it in Enzyme, because it's exporting as function type:</p>
  
  <pre class="lang-js prettyprint-override"><code>class MyComponent extends React.Component&lt;MyComponentProps, MyComponentState&gt; {
  ...
  }
  
  export default connect(null, mapDispatchToProps)(MyComponent);
  export const MyComponentRaw = MyComponent
  </code></pre>
  
  <p>and next, when I'm trying to use it in Enzyme:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {MyComponentRaw} from "../../MyComponent";
  
  const wrapper = shallow&lt;typeof MyComponentRaw&gt;(&lt;MyComponentRaw /&gt;)
  </code></pre>
  
  <p>it's is visible as <code>function</code>.</p>
  
  <p>On the other hand, when I exported component directly:</p>
  
  <pre><code>export default class MyComponent extends React.Component&lt;MyComponentProps, MyComponentState&gt; {
  ...
  }
  </code></pre>
  
  <p>I'm able to use it in Enzyme:</p>
  
  <pre><code>import MyComponentRaw from "../../MyComponent";
  
  const wrapper = shallow&lt;typeof MyComponentRaw&gt;(&lt;MyComponentRaw /&gt;)
  </code></pre>