title: Using React forwardRef with Typescript generic JSX arguments
body: <p>Given the following typed React component using <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html" rel="noreferrer">generic type arguments</a>, how would I go about wrapping it in React's new <code>forwardRef</code> API?</p>
  
  <pre><code>type Props&lt;T&gt; = {
    forwardedRef?: Ref&lt;HTMLInputElement&gt;
    ...
  }
  
  class GenericComponent&lt;T&gt; extends Component&lt;Props&lt;T&gt;&gt; {
    ...
  }
  
  const ComponentWithRef = forwardRef&lt;HTMLInputElement, Props&lt;T&gt;&gt;((props, ref) =&gt; (
    &lt;StringInput&lt;T&gt; {...props} forwardedRef={ref} /&gt;
  ))
  </code></pre>
  
  <p>The above approach has no way to define the <code>T</code> generic.</p>