title: React prop types with TypeScript - how to have a function type?
body: <p>Is there a best practice for having a function type with React prop types with TypeScript? </p>
  
  <p>I assumed this would work but in fact it errored: </p>
  
  <pre><code>type Props = {
    onClick: Function
  };
  
  const Submit = ({ onClick }: Props) =&gt; {
    return (
      &lt;button type="button" onClick={onClick}&gt;
        click me
      &lt;/button&gt;
    );
  </code></pre>
  
  <p>Following this thread I got it working, but it seems needlessly verbose: 
  <a href="https://github.com/Microsoft/TypeScript/issues/20007" rel="noreferrer">https://github.com/Microsoft/TypeScript/issues/20007</a></p>
  
  <pre><code>type Props = {
    onClick: (...args: any[]) =&gt; any;
  };
  
  const Submit = ({ onClick }: Props) =&gt; {
    return (
      &lt;button type="button" onClick={onClick}&gt;
        click me
      &lt;/button&gt;
    );
  </code></pre>