-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreact-redux.d.ts
37 lines (27 loc) · 934 Bytes
/
react-redux.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/// <reference path="typings/main.d.ts" />
import * as React from "react";
import {IStore, IDispatch} from "redux";
declare module ReactRedux {
export class Provider extends React.Component<{store:IStore<any>},{}>{}
export interface IMapStateToProps {
(state: any, ownProps?: any): Object;
}
export interface IMapDispatchToProps {
(dispatch: IDispatch, ownProps?: any): Object;
}
export interface IConnectOptions {
pure?: boolean;
withRef?: boolean;
}
type ComponentConstructor<P> = React.ComponentClass<P> | React.StatelessComponent<P>
function wrapWithConnect<T extends ComponentConstructor<any>>(
component: T
): T
export function connect(
mapStateToProps?: IMapStateToProps,
mapDispatchToProps?: IMapDispatchToProps | Object,
mergeProps?: (stateProps: Object, dispatchProps: Object, ownProps: Object) => Object,
options?: IConnectOptions
): typeof wrapWithConnect;
}
export = ReactRedux;