title: How to type EventTarget?
body: <p>I am trying to set an input element's <code>value</code> property using Typescript. To do so, I have to specify that the event target is <code>HTMLInputElement</code>.
  <br />
  <br />
  I have tried two methods:</p>
  <p><strong>First method</strong></p>
  <pre><code>onClick={(e: React.MouseEvent) =&gt; {
    const target = e.target as HTMLInputElement;
    target.value = &quot;&quot;;
  }}
  </code></pre>
  <p><strong>Second method</strong></p>
  <pre><code>onClick={(e: React.MouseEvent&lt;HTMLInputElement&gt;) =&gt; {
    e.target.value = &quot;&quot;;
  }}
  </code></pre>
  <p>The first method is working fine but the second is raising the following TS error:</p>
  <pre><code>TS2339: Property 'value' does not exist on type 'EventTarget'.
  </code></pre>
  <p>How do these two methods differ and why is the second failing?</p>