title: React typescript how to type a hoc
body: <p>I want to use typescript in my brand new project
  but I've a hard time to type an HOC component</p>
  
  <pre><code>const withClass = (Wrapped: Component&lt;any, {}, any&gt;, className: string) =&gt; {
    return props =&gt; (
      &lt;div className={className}&gt;
        &lt;Wrapped /&gt;
      &lt;/div&gt;
    );
  };
  </code></pre>
  
  <p>It doesn't work with this error</p>
  
  <p>Type error: Argument of type 'typeof App' is not assignable to parameter of type 'Component'.
    Type 'typeof App' is missing the following properties from type 'Component': context, setState, forceUpdate, render, and 3 more.  TS2345</p>
  
  <p>so what's the right way?</p>