mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00: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)}/>
}
```
|
||
|---|---|---|
| .. | ||
| index.d.ts | ||
| react-dom.server.d.ts | ||
| tsconfig.json | ||