* Make SyntheticEvent.target generic over T again
This change was added in 084926e23a but then reverted in 5607f54def. The revert _looks_ like an accident to me, as it's a merge coming in from master vs. a purposeful change. Maybe it got accidentally stepped on in resolving a conflict?
If `target` should no longer be the intersection of `EventTarget` and `T`, then there's not much point to `SyntheticEvent` being generic over `T`.
* Make `currentTarget` generic over instead instead of `target`
Fixes
```bash
client/components/controllers/Notes.tsx(199,13): error TS2605: JSX element type 'Component<OwnProps, {} | void>' is not a constructor function for JSX elements.
Types of property 'render' are incompatible.
Type '() => Element | null' is not assignable to type '() => Element'.
Type 'Element | null' is not assignable to type 'Element'.
Type 'null' is not assignable to type 'Element'.
```
rendering `null` is acceptable and should be accepted.
See https://github.com/Microsoft/TypeScript/issues/10259
Props always pass to StatelessComponent even if we pass no props.
Example:
```js
function Test(props) {
return <div>props: {JSON.stringify(props)}</div>
}
React.render(<Test />, document.body)
```
will render into `props: {}`
[jsfiddle](https://jsfiddle.net/LL25c28c/)
We need to fix this because otherwise we have error:
`Property 'propName' does not exist on type 'IntrinsicAttributes & (IMyInterface | undefined)'.`
for that code:
```js
const MyComponent: React.SFC<IMyInterface> = ({ propName }: IMyInterface) => {
// ...
}
```
* For ReactDOM.render, make element parameter nullable to match React API and match Typescript 2.0 definition for Document.getElementById
* one more test
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)}/>
}
```