title: React 15 + Typescript: React.FormEvent<T> typings are incomplete?
body: <p>The onChange attribute for a textarea form wants a <code>React.EventHandler&lt;React.FormEvent&lt;HTMLTextAreaElement&gt;&gt;</code>.</p>
  
  <p>Down the rabbit hole and we find that</p>
  
  <pre><code>interface EventHandler&lt;E extends SyntheticEvent&lt;any&gt;&gt; {
      (event: E): void;
  }
  
  type FormEventHandler&lt;T&gt; = EventHandler&lt;FormEvent&lt;T&gt;&gt;;
  
  /* ... */
  
  interface FormEvent&lt;T&gt; extends SyntheticEvent&lt;T&gt; {
  }
  </code></pre>
  
  <p>In other words, onChange simply wants a function that takes a FormEvent and returns void, and FormEvent currently is identical to  SyntheticEvent.</p>
  
  <p>The problem is that <code>SyntheticEvent&lt;T&gt;.target: EventTarget</code>, and <code>EventTarget</code> does not define <code>value</code>.</p>
  
  <p>I noticed that there's also <code>currentTarget: EventTarget &amp; T</code>, where T is <code>HTMLTextInputArea</code>, and that seems to have value defined. But the <a href="https://facebook.github.io/react/docs/forms.html" rel="noreferrer">form handling pages show</a> <code>event.target</code> being looked at, not <code>event.currentTarget</code>. What's the difference? Should I follow the typings or the doc?</p>
  
  <p>Edit: I answered my own question. <code>currentTarget</code> is the element I've bound the handler to, and <code>target</code> is that element that received the action which precipitated this event. I suppose I always want to read value from <code>currentTarget</code>, so in this case, I think the typings are leading me right and the docs are leading me wrong. </p>