Closed rbiggs closed 5 years ago
I was registering an oninput event in my JSX on an input tag. Then in the handler I was capturing the value of the input like so:
<input onclick={e => send(e.target.value)} type='text'/>
But in Visual Studio Code I was getting red squiggles warning me the the property "value" did not exist on EventTarget
. This change makes target
point to the element the event is registered on. So, in the case of an input of type text or a textarea, e.target.value
is valid and it knows that value is of type string.
Ok strange, you would have thought it was there. Hmm.. I wonder if typing the way I've been for Events are just wrong since the native events would just be fine. In any case this is common enough I will just merge as is for now.
Thank you.