title: React TypeScript: Correct Types for onChange
body: <p>What are the correct types for <code>target: { value: any, name: any }</code>? The error I get is <code>Duplicate identifier 'any'.</code> I also get the error <code>Binding element 'any' implicitly has an 'any' type.</code> And why does <code>value</code> give the error 'Cannot find name 'value'?'</p>
  
  <p>I have a <a href="https://codesandbox.io/s/smoosh-mountain-6qri4" rel="nofollow noreferrer">code sandbox here</a> </p>
  
  <pre><code>
  const [state, setState] = useState({
      fullName: '',
  });
  
  const { fullName } = state;
  
  const onChange = ({ target: { value: any, name: any } }) =&gt; {
      setState((prev) =&gt; ({
          ...prev,
          [name] : value, // &lt;= 'Cannot find name 'value'
      }));
  };
  
  ...
  
  &lt;input
    type='text'
    placeholder='Full name'
    name='fullName'
    value={fullName}
    onChange={onChange}
  /&gt;
  </code></pre>