mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 22:38:33 +08:00
this allows getting the actual html element type from events.
Example:
```ts
render() {
return <input onChange={e => console.log(e.target.value)}/>
}
```
Previously you would have to cast the target manually:
```ts
render() {
return <input onChange={e => console.log((e.target as
HTMLInputElement).value)}/>
}
```