* 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)}/>
}
```
* SyntheticEventData extends browser Event
From https://facebook.github.io/react/docs/events.html
Your event handlers will be passed instances of SyntheticEvent, a
cross-browser wrapper around the browser's native event. It has the same
interface as the browser's native event, including stopPropagation() and
preventDefault(), except the events work identically across all
browsers.
* make react synthetic event properties optional
* Allow specifying `void` for component state type parameter.
Per comments on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8543,
the type parameter for component state was changed to `{}` from `any` for
increased type safety, but prevents specifying (non-functional) stateless
components without having empty state parameters, which seems messy. This
changes the type to `{} | void` to allow this while staying stricter than
`any`.
* Make react tests a bit more strict.
* Rename State -> ComponentState to make it a bit more explicit.
- `StatelessComponent` is missing an optional `displayName` property
- `ReactChildren.only` always returns a `ReactElement`
- add tests for the above and `ReactTestUtils.renderIntoDocument`
- Also add image to JSX.IntrinsicElements
- Add tests for callback and string refs
- Fix bug where Component<P, S> subclasses are required to have defaultProps
This more accurately reflects that createClass returns a class, not an
instance of a class. This will be more important as React v0.13 is released
which supports using ES6 classes as components.