title: onClick problem with typescript 3.33 and react
body: <p>I am trying to use an onClick property on a link with TypeScript and React: </p>
  
  <pre><code>import * as React from 'react';
  import { any } from 'prop-types';
  
  function handleClick(this:any,name:React.ReactNode) {
    console.log('The link was clicked.');
    this.props.callbackFromParentSearch(name);
  }
  
  export const Suggestions = (props:any) =&gt; {
    const options = props.results.map((r: { id: React.Key; name: React.ReactNode; }) =&gt; (
      &lt;a href="#" onClick={handleClick(r.name)}&gt;
      &lt;li key={r.id}&gt;
  
        {r.name}
  
      &lt;/li&gt;
      &lt;/a&gt;
    ))
    return &lt;ul&gt;{options}&lt;/ul&gt;
  }
  
  export default Suggestions
  </code></pre>
  
  <p>But this gives an error:</p>
  
  <blockquote>
    <p>Type 'void' is not assignable to type '(event:
    MouseEvent) => void'.ts(2322)
    index.d.ts(1315, 9): The expected type comes from property 'onClick'
    which is declared here on type
    'DetailedHTMLProps,
    HTMLAnchorElement>'</p>
  </blockquote>
  
  <p>So how to use the onClick event properly in TypeScript &amp; React?</p>