* feat(react-redux): add strict null check
* feat(react-redux): remove improper inference tests
Infered decorated typings would rely on the implicit and false
assumption that decorated component props extend injected props and
own props
#24922#24913
* fix(react-redux): injected props and decorated component props intersection
* InjectedProps should not have to extend DecoratedProps
* DecoratedProps should not have to extend InjectedProps
* DecoratedProps should extend Intersection<InjectedProps, DecoratedProps>
* Remaining Props should be required on the decoration output
#24913#24922
* feat(react-redux): add new commiters
* feat(react-redux): 2.9 keyof compatibility depends on Extract (2.8)
* [react-redux] Copy current files to v5 sub directory
* [react-redux] Fix v5 tsconfig
* [react-redux] Increase the react-redux version in header comment
* [react-redux] Update type defenitions for redux@4.0.0
* [react] Use HTMLDialogElement for the dialog node
* Actually add the `open` property
* This update requires typescript 2.6
* Update dependents of react to also require typescript 2.6
* Add ConnectFunction interface
* Add createProvider function declaration
* Add documentation for createProvider
* Update documentation for Connect
* Add new author
* Add test for createProvider
This fixes the resulting wrapped component type returned by
the connect HOC when the `dispatchToProps` argument is an object. (Fixes
issue #18955)
Previously we were using `MapDispatchToPropsObject` but that doesn't
work with `Omit<T, K>`, so dispatch props were being preserved on the
resulting object. I've replaced that with `TDispatchProps` instead.
I've added test code by @horiuchi, adapted from:
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18955
That way the function returned by `connect()` (when no `mapDispatchToProps` function is specified) can also take React classes that don't have a `dispatch` prop declared. (But we get to keep the type checking for the classes that do)
The existing Options had a redundant "withRef" parameter (it was already inheriting from ConnectOptions), and were missing some helper functions for diffing state and props:
fd81f1812c/docs/api.md (arguments)
The types were failing to remove props they injected from requirements
for the parents rendering them. By using Omit we can omit props that are
injected from the connect component so that we don't get errors during
parent rendering.
All of this is done through type inference so that end users don't have
to be aware that this is happening.