title: Typescript React component decorator
body: <p>It might be a rookie mistake, but I'm trying to create a simple class decorator using typescript for a React component, like this:</p>
  
  <pre><code>import * as React from 'react'
  
  interface Greeter {
    sayHello: boolean
  }
  
  const greet = (arg: Greeter) =&gt; (Comp: React.Component) =&gt; {
    // do some stuff
  }
  
  @greet({ sayHello: true })
  class MyComp extends React.Component&lt;any, any&gt; {
    render() {
      return &lt;div&gt;Hi&lt;/div&gt;
    }
  }
  </code></pre>
  
  <p>But I'm getting a compile error saying</p>
  
  <blockquote>
    <p>Argument of type 'typeof MyComp' is not assignable to parameter of
    type 'Component&lt;{}, {}>'.</p>
  </blockquote>
  
  <p>What exactly am I doing wrong here? Am I missing something with the decorator syntax?</p>