mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Merge pull request #27724 from 7mllm7/master
Update react-redux to support `redux`'s types
This commit is contained in:
6
types/react-redux/index.d.ts
vendored
6
types/react-redux/index.d.ts
vendored
@@ -189,14 +189,14 @@ interface MapStateToPropsFactory<TStateProps, TOwnProps, State> {
|
||||
type MapStateToPropsParam<TStateProps, TOwnProps, State> = MapStateToPropsFactory<TStateProps, TOwnProps, State> | MapStateToProps<TStateProps, TOwnProps, State> | null | undefined;
|
||||
|
||||
interface MapDispatchToPropsFunction<TDispatchProps, TOwnProps> {
|
||||
(dispatch: Dispatch, ownProps: TOwnProps): TDispatchProps;
|
||||
(dispatch: Dispatch<Action>, ownProps: TOwnProps): TDispatchProps;
|
||||
}
|
||||
|
||||
type MapDispatchToProps<TDispatchProps, TOwnProps> =
|
||||
MapDispatchToPropsFunction<TDispatchProps, TOwnProps> | TDispatchProps;
|
||||
|
||||
interface MapDispatchToPropsFactory<TDispatchProps, TOwnProps> {
|
||||
(dispatch: Dispatch, ownProps: TOwnProps): MapDispatchToProps<TDispatchProps, TOwnProps>;
|
||||
(dispatch: Dispatch<Action>, ownProps: TOwnProps): MapDispatchToProps<TDispatchProps, TOwnProps>;
|
||||
}
|
||||
|
||||
type MapDispatchToPropsParam<TDispatchProps, TOwnProps> = MapDispatchToPropsFactory<TDispatchProps, TOwnProps> | MapDispatchToProps<TDispatchProps, TOwnProps>;
|
||||
@@ -264,7 +264,7 @@ export declare function connectAdvanced<S, TProps, TOwnProps, TFactoryOptions =
|
||||
* previous object when appropriate.
|
||||
*/
|
||||
export interface SelectorFactory<S, TProps, TOwnProps, TFactoryOptions> {
|
||||
(dispatch: Dispatch, factoryOptions: TFactoryOptions): Selector<S, TProps, TOwnProps>
|
||||
(dispatch: Dispatch<Action>, factoryOptions: TFactoryOptions): Selector<S, TProps, TOwnProps>
|
||||
}
|
||||
|
||||
export interface Selector<S, TProps, TOwnProps> {
|
||||
|
||||
Reference in New Issue
Block a user