title: Generics error with forwardRef: Property 'ref' does not exist on type 'IntrinsicAttributes'
body: <p>When using forwardRef with generics, I get <code>Property 'children' does not exist on type 'IntrinsicAttributes'</code> or <code>Property 'ref' does not exist on type 'IntrinsicAttributes'</code>.</p>
  
  <p><a href="https://codesandbox.io/s/react-typescript-0dt6d?fontsize=14" rel="noreferrer">https://codesandbox.io/s/react-typescript-0dt6d?fontsize=14</a></p>
  
  <p>Relevant code in CodeSandbox link above replicated here:</p>
  
  <pre><code>interface SimpleProps&lt;T extends string&gt;
    extends React.HTMLProps&lt;HTMLButtonElement&gt; {
    random: T;
  }
  
  interface Props {
    ref?: React.RefObject&lt;HTMLButtonElement&gt;;
    children: React.ReactNode;
  }
  
  function WithGenericsButton&lt;T extends string&gt;() {
    return React.forwardRef&lt;HTMLButtonElement, Props &amp; SimpleProps&lt;T&gt;&gt;(
      ({ children, ...otherProps }, ref) =&gt; (
        &lt;button ref={ref} className="FancyButton" {...otherProps}&gt;
          {children}
        &lt;/button&gt;
      )
    );
  }
  
  () =&gt; (
    &lt;WithGenericsButton&lt;string&gt; ref={ref} color="green"&gt;
      Click me! // Errors: Property 'children' does not exist on type 'IntrinsicAttributes'
    &lt;/WithGenericsButton&gt;
  )
  </code></pre>
  
  <p>A potential solution is suggested here but not sure how to implement in this context: 
  <a href="https://github.com/microsoft/TypeScript/pull/30215" rel="noreferrer">https://github.com/microsoft/TypeScript/pull/30215</a>
  (Found from <a href="https://stackoverflow.com/a/51898192/9973558">https://stackoverflow.com/a/51898192/9973558</a>)</p>