title: convert typescript react calculator button component
body: <ul>
  <li><p>I'm trying to figure out what I'm missing in TypeScript to convert this calculator app into TypeScript.</p>
  </li>
  <li><p>I created a type ButtonProps, but I'm not sure what to set the handleClick or children to, other than 'any'.</p>
  </li>
  <li><p>Also, the function 'isOperator', I set to take in a number or string because it checks if it's not a number or if it's a specific string. However, typescript is yelling at me: This expression is not callable. No constituent of type 'string | number' is callable.</p>
  </li>
  <li><p>Can you help me figure out the types I need to make this work?</p>
  </li>
  <li><p>Is there a site that you recommend that can help figure types out? Seems quite confusing.</p>
  <pre><code>  import React, {FC} from 'react';
    import '../styling/button.css';
  
    // create types for props
    type ButtonProps = {
      handleClick: any;
      children: any;
    }
  
    const isOperator:number | string = val =&gt; {
      return !isNaN(val) || val === &quot;.&quot; || val === &quot;=&quot;;
    }
  
    // generic type, FC
    export const Button: FC &lt;ButtonProps&gt; = ({children, handleClick}) =&gt; {
      return (
        &lt;div className={`button-wrapper ${isOperator(children) ? null : &quot;operator&quot;}`}
            onClick={() =&gt; handleClick(children)}
        &gt;
          {children}
        &lt;/div&gt;
      )
    }
  </code></pre>
  </li>
  </ul>