title: React fordwardRef with typescript
body: <p>I have forwarded ref using React <code>forwardRef</code> below is my code:</p>
  <pre><code>interface PropsDummy {}
  
  const ProfileMenu = forwardRef&lt;HTMLInputElement, PropsDummy&gt;((props, ref) =&gt; {
    console.log(ref.current);
  }
  </code></pre>
  <p>but why this causing typescript error?</p>
  <pre><code>Property 'current' does not exist on type '((instance: HTMLInputElement | null) =&gt; void) | MutableRefObject&lt;HTMLInputElement | null&gt;'
  </code></pre>
  <p>but if I use aliasing that current object works great without typescript error</p>
  <pre><code>interface PropsDummy {}
  
  const ProfileMenu = forwardRef&lt;HTMLInputElement, PropsDummy&gt;((props, ref) =&gt; {
    const myRef = ref as React.RefObject&lt;HTMLInputElement&gt;;
    console.log(myRef.current);
  }
  </code></pre>
  <p>how to get current object without typescript error?</p>
  <p>thanks</p>