|
@@ -1,192 +1,276 @@
|
1
|
|
-// flow-typed signature: d4e793bc07ef1dc9906a244b12960f7b
|
2
|
|
-// flow-typed version: cf33ff8762/react-redux_v5.x.x/flow_>=v0.63.0
|
|
1
|
+// flow-typed signature: f06f00c3ad0cfedb90c0c6de04b219f3
|
|
2
|
+// flow-typed version: 3a6d556e4b/react-redux_v5.x.x/flow_>=v0.89.x
|
3
|
3
|
|
4
|
|
-import type { Dispatch, Store } from "redux";
|
|
4
|
+/**
|
|
5
|
+The order of type arguments for connect() is as follows:
|
5
|
6
|
|
6
|
|
-declare module "react-redux" {
|
7
|
|
- import type { ComponentType, ElementConfig } from 'react';
|
|
7
|
+connect<Props, OwnProps, StateProps, DispatchProps, State, Dispatch>(…)
|
8
|
8
|
|
9
|
|
- declare export class Provider<S, A> extends React$Component<{
|
10
|
|
- store: Store<S, A>,
|
11
|
|
- children?: any
|
12
|
|
- }> {}
|
|
9
|
+In Flow v0.89 only the first two are mandatory to specify. Other 4 can be repaced with the new awesome type placeholder:
|
13
|
10
|
|
14
|
|
- declare export function createProvider(
|
15
|
|
- storeKey?: string,
|
16
|
|
- subKey?: string
|
17
|
|
- ): Provider<*, *>;
|
|
11
|
+connect<Props, OwnProps, _, _, _, _>(…)
|
18
|
12
|
|
19
|
|
- /*
|
|
13
|
+But beware, in case of weird type errors somewhere in random places
|
|
14
|
+just type everything and get to a green field and only then try to
|
|
15
|
+remove the definitions you see bogus.
|
20
|
16
|
|
|
17
|
+Decrypting the abbreviations:
|
|
18
|
+ WC = Component being wrapped
|
21
|
19
|
S = State
|
22
|
|
- A = Action
|
|
20
|
+ D = Dispatch
|
23
|
21
|
OP = OwnProps
|
24
|
22
|
SP = StateProps
|
25
|
23
|
DP = DispatchProps
|
26
|
24
|
MP = Merge props
|
27
|
|
- MDP = Map dispatch to props object
|
28
|
25
|
RSP = Returned state props
|
29
|
26
|
RDP = Returned dispatch props
|
30
|
27
|
RMP = Returned merge props
|
31
|
28
|
CP = Props for returned component
|
32
|
29
|
Com = React Component
|
33
|
|
- */
|
|
30
|
+ ST = Static properties of Com
|
|
31
|
+ EFO = Extra factory options (used only in connectAdvanced)
|
|
32
|
+*/
|
34
|
33
|
|
35
|
|
- declare type MapStateToProps<S: Object, SP: Object, RSP: Object> = (state: S, props: SP) => RSP;
|
36
|
|
-
|
37
|
|
- declare type MapDispatchToProps<A, OP: Object, RDP: Object> = (dispatch: Dispatch<A>, ownProps: OP) => RDP;
|
38
|
|
-
|
39
|
|
- declare type MergeProps<SP: Object, DP: Object, MP: Object, RMP: Object> = (
|
40
|
|
- stateProps: SP,
|
41
|
|
- dispatchProps: DP,
|
42
|
|
- ownProps: MP
|
43
|
|
- ) => RMP;
|
|
34
|
+declare module "react-redux" {
|
|
35
|
+ // ------------------------------------------------------------
|
|
36
|
+ // Typings for connect()
|
|
37
|
+ // ------------------------------------------------------------
|
44
|
38
|
|
45
|
|
- declare type ConnectOptions<S: Object, OP: Object, RSP: Object, RMP: Object> = {|
|
|
39
|
+ declare export type Options<S, OP, SP, MP> = {|
|
46
|
40
|
pure?: boolean,
|
47
|
41
|
withRef?: boolean,
|
48
|
42
|
areStatesEqual?: (next: S, prev: S) => boolean,
|
49
|
43
|
areOwnPropsEqual?: (next: OP, prev: OP) => boolean,
|
50
|
|
- areStatePropsEqual?: (next: RSP, prev: RSP) => boolean,
|
51
|
|
- areMergedPropsEqual?: (next: RMP, prev: RMP) => boolean,
|
52
|
|
- storeKey?: string
|
|
44
|
+ areStatePropsEqual?: (next: SP, prev: SP) => boolean,
|
|
45
|
+ areMergedPropsEqual?: (next: MP, prev: MP) => boolean,
|
|
46
|
+ storeKey?: string,
|
53
|
47
|
|};
|
54
|
48
|
|
55
|
|
- declare type OmitDispatch<Component> = $Diff<Component, {dispatch: Dispatch<*>}>;
|
|
49
|
+ declare type MapStateToProps<-S, -OP, +SP> =
|
|
50
|
+ | ((state: S, ownProps: OP) => SP)
|
|
51
|
+ // If you want to use the factory function but get a strange error
|
|
52
|
+ // like "function is not an object" then just type the factory function
|
|
53
|
+ // like this:
|
|
54
|
+ // const factory: (State, OwnProps) => (State, OwnProps) => StateProps
|
|
55
|
+ // and provide the StateProps type to the SP type parameter.
|
|
56
|
+ | ((state: S, ownProps: OP) => (state: S, ownProps: OP) => SP);
|
56
|
57
|
|
57
|
|
- declare export function connect<
|
58
|
|
- Com: ComponentType<*>,
|
59
|
|
- S: Object,
|
60
|
|
- DP: Object,
|
61
|
|
- RSP: Object,
|
62
|
|
- CP: $Diff<OmitDispatch<ElementConfig<Com>>, RSP>
|
63
|
|
- >(
|
64
|
|
- mapStateToProps: MapStateToProps<S, DP, RSP>,
|
65
|
|
- mapDispatchToProps?: null
|
66
|
|
- ): (component: Com) => ComponentType<CP & DP>;
|
67
|
|
-
|
68
|
|
- declare export function connect<Com: ComponentType<*>>(
|
69
|
|
- mapStateToProps?: null,
|
70
|
|
- mapDispatchToProps?: null
|
71
|
|
- ): (component: Com) => ComponentType<OmitDispatch<ElementConfig<Com>>>;
|
72
|
|
-
|
73
|
|
- declare export function connect<
|
74
|
|
- Com: ComponentType<*>,
|
75
|
|
- A,
|
|
58
|
+ declare type Bind<D> = <A, R>((...A) => R) => (...A) => $Call<D, R>;
|
|
59
|
+
|
|
60
|
+ declare type MapDispatchToPropsFn<D, -OP, +DP> =
|
|
61
|
+ | ((dispatch: D, ownProps: OP) => DP)
|
|
62
|
+ // If you want to use the factory function but get a strange error
|
|
63
|
+ // like "function is not an object" then just type the factory function
|
|
64
|
+ // like this:
|
|
65
|
+ // const factory: (Dispatch, OwnProps) => (Dispatch, OwnProps) => DispatchProps
|
|
66
|
+ // and provide the DispatchProps type to the DP type parameter.
|
|
67
|
+ | ((dispatch: D, ownProps: OP) => (dispatch: D, ownProps: OP) => DP);
|
|
68
|
+
|
|
69
|
+ declare class ConnectedComponent<OP, +WC> extends React$Component<OP> {
|
|
70
|
+ static +WrappedComponent: WC;
|
|
71
|
+ getWrappedInstance(): React$ElementRef<WC>;
|
|
72
|
+ }
|
|
73
|
+ // The connection of the Wrapped Component and the Connected Component
|
|
74
|
+ // happens here in `MP: P`. It means that type wise MP belongs to P,
|
|
75
|
+ // so to say MP >= P.
|
|
76
|
+ declare type Connector<P, OP, MP: P> = <WC: React$ComponentType<P>>(
|
|
77
|
+ WC,
|
|
78
|
+ ) => Class<ConnectedComponent<OP, WC>> & WC;
|
|
79
|
+
|
|
80
|
+ // No `mergeProps` argument
|
|
81
|
+
|
|
82
|
+ // Got error like inexact OwnProps is incompatible with exact object type?
|
|
83
|
+ // Just make the OP parameter for `connect()` an exact object.
|
|
84
|
+ declare type MergeOP<OP, D> = {| ...$Exact<OP>, dispatch: D |};
|
|
85
|
+ declare type MergeOPSP<OP, SP, D> = {| ...$Exact<OP>, ...SP, dispatch: D |};
|
|
86
|
+ declare type MergeOPDP<OP, DP> = {| ...$Exact<OP>, ...DP |};
|
|
87
|
+ declare type MergeOPSPDP<OP, SP, DP> = {| ...$Exact<OP>, ...SP, ...DP |};
|
|
88
|
+
|
|
89
|
+ declare export function connect<-P, -OP, -SP, -DP, -S, -D>(
|
|
90
|
+ mapStateToProps?: null | void,
|
|
91
|
+ mapDispatchToProps?: null | void,
|
|
92
|
+ mergeProps?: null | void,
|
|
93
|
+ options?: ?Options<S, OP, {||}, MergeOP<OP, D>>,
|
|
94
|
+ ): Connector<P, OP, MergeOP<OP, D>>;
|
|
95
|
+
|
|
96
|
+ declare export function connect<-P, -OP, -SP, -DP, -S, -D>(
|
|
97
|
+ // If you get error here try adding return type to your mapStateToProps function
|
|
98
|
+ mapStateToProps: MapStateToProps<S, OP, SP>,
|
|
99
|
+ mapDispatchToProps?: null | void,
|
|
100
|
+ mergeProps?: null | void,
|
|
101
|
+ options?: ?Options<S, OP, SP, MergeOPSP<OP, SP, D>>,
|
|
102
|
+ ): Connector<P, OP, MergeOPSP<OP, SP, D>>;
|
|
103
|
+
|
|
104
|
+ // In this case DP is an object of functions which has been bound to dispatch
|
|
105
|
+ // by the given mapDispatchToProps function.
|
|
106
|
+ declare export function connect<-P, -OP, -SP, -DP, S, D>(
|
|
107
|
+ mapStateToProps: null | void,
|
|
108
|
+ mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
|
|
109
|
+ mergeProps?: null | void,
|
|
110
|
+ options?: ?Options<S, OP, {||}, MergeOPDP<OP, DP>>,
|
|
111
|
+ ): Connector<P, OP, MergeOPDP<OP, DP>>;
|
|
112
|
+
|
|
113
|
+ // In this case DP is an object of action creators not yet bound to dispatch,
|
|
114
|
+ // this difference is not important in the vanila redux,
|
|
115
|
+ // but in case of usage with redux-thunk, the return type may differ.
|
|
116
|
+ declare export function connect<-P, -OP, -SP, -DP, S, D>(
|
|
117
|
+ mapStateToProps: null | void,
|
|
118
|
+ mapDispatchToProps: DP,
|
|
119
|
+ mergeProps?: null | void,
|
|
120
|
+ options?: ?Options<S, OP, {||}, MergeOPDP<OP, DP>>,
|
|
121
|
+ ): Connector<P, OP, MergeOPDP<OP, $ObjMap<DP, Bind<D>>>>;
|
|
122
|
+
|
|
123
|
+ declare export function connect<-P, -OP, -SP, -DP, S, D>(
|
|
124
|
+ // If you get error here try adding return type to your mapStateToProps function
|
|
125
|
+ mapStateToProps: MapStateToProps<S, OP, SP>,
|
|
126
|
+ mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
|
|
127
|
+ mergeProps?: null | void,
|
|
128
|
+ options?: ?Options<S, OP, SP, {| ...OP, ...SP, ...DP |}>,
|
|
129
|
+ ): Connector<P, OP, {| ...OP, ...SP, ...DP |}>;
|
|
130
|
+
|
|
131
|
+ declare export function connect<-P, -OP, -SP, -DP, S, D>(
|
|
132
|
+ // If you get error here try adding return type to your mapStateToProps function
|
|
133
|
+ mapStateToProps: MapStateToProps<S, OP, SP>,
|
|
134
|
+ mapDispatchToProps: DP,
|
|
135
|
+ mergeProps?: null | void,
|
|
136
|
+ options?: ?Options<S, OP, SP, MergeOPSPDP<OP, SP, DP>>,
|
|
137
|
+ ): Connector<P, OP, MergeOPSPDP<OP, SP, $ObjMap<DP, Bind<D>>>>;
|
|
138
|
+
|
|
139
|
+ // With `mergeProps` argument
|
|
140
|
+
|
|
141
|
+ declare type MergeProps<+P, -OP, -SP, -DP> = (
|
|
142
|
+ stateProps: SP,
|
|
143
|
+ dispatchProps: DP,
|
|
144
|
+ ownProps: OP,
|
|
145
|
+ ) => P;
|
|
146
|
+
|
|
147
|
+ declare export function connect<-P, -OP, -SP: {||}, -DP: {||}, S, D>(
|
|
148
|
+ mapStateToProps: null | void,
|
|
149
|
+ mapDispatchToProps: null | void,
|
|
150
|
+ // If you get error here try adding return type to you mapStateToProps function
|
|
151
|
+ mergeProps: MergeProps<P, OP, {||}, {| dispatch: D |}>,
|
|
152
|
+ options?: ?Options<S, OP, {||}, P>,
|
|
153
|
+ ): Connector<P, OP, P>;
|
|
154
|
+
|
|
155
|
+ declare export function connect<-P, -OP, -SP, -DP: {||}, S, D>(
|
|
156
|
+ mapStateToProps: MapStateToProps<S, OP, SP>,
|
|
157
|
+ mapDispatchToProps: null | void,
|
|
158
|
+ // If you get error here try adding return type to you mapStateToProps function
|
|
159
|
+ mergeProps: MergeProps<P, OP, SP, {| dispatch: D |}>,
|
|
160
|
+ options?: ?Options<S, OP, SP, P>,
|
|
161
|
+ ): Connector<P, OP, P>;
|
|
162
|
+
|
|
163
|
+ // In this case DP is an object of functions which has been bound to dispatch
|
|
164
|
+ // by the given mapDispatchToProps function.
|
|
165
|
+ declare export function connect<-P, -OP, -SP: {||}, -DP, S, D>(
|
|
166
|
+ mapStateToProps: null | void,
|
|
167
|
+ mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
|
|
168
|
+ mergeProps: MergeProps<P, OP, {||}, DP>,
|
|
169
|
+ options?: ?Options<S, OP, {||}, P>,
|
|
170
|
+ ): Connector<P, OP, P>;
|
|
171
|
+
|
|
172
|
+ // In this case DP is an object of action creators not yet bound to dispatch,
|
|
173
|
+ // this difference is not important in the vanila redux,
|
|
174
|
+ // but in case of usage with redux-thunk, the return type may differ.
|
|
175
|
+ declare export function connect<-P, -OP, -SP: {||}, -DP, S, D>(
|
|
176
|
+ mapStateToProps: null | void,
|
|
177
|
+ mapDispatchToProps: DP,
|
|
178
|
+ mergeProps: MergeProps<P, OP, {||}, $ObjMap<DP, Bind<D>>>,
|
|
179
|
+ options?: ?Options<S, OP, {||}, P>,
|
|
180
|
+ ): Connector<P, OP, P>;
|
|
181
|
+
|
|
182
|
+ // In this case DP is an object of functions which has been bound to dispatch
|
|
183
|
+ // by the given mapDispatchToProps function.
|
|
184
|
+ declare export function connect<-P, -OP, -SP, -DP, S, D>(
|
|
185
|
+ mapStateToProps: MapStateToProps<S, OP, SP>,
|
|
186
|
+ mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
|
|
187
|
+ mergeProps: MergeProps<P, OP, SP, DP>,
|
|
188
|
+ options?: ?Options<S, OP, SP, P>,
|
|
189
|
+ ): Connector<P, OP, P>;
|
|
190
|
+
|
|
191
|
+ // In this case DP is an object of action creators not yet bound to dispatch,
|
|
192
|
+ // this difference is not important in the vanila redux,
|
|
193
|
+ // but in case of usage with redux-thunk, the return type may differ.
|
|
194
|
+ declare export function connect<-P, -OP, -SP, -DP, S, D>(
|
|
195
|
+ mapStateToProps: MapStateToProps<S, OP, SP>,
|
|
196
|
+ mapDispatchToProps: DP,
|
|
197
|
+ mergeProps: MergeProps<P, OP, SP, $ObjMap<DP, Bind<D>>>,
|
|
198
|
+ options?: ?Options<S, OP, SP, P>,
|
|
199
|
+ ): Connector<P, OP, P>;
|
|
200
|
+
|
|
201
|
+ // ------------------------------------------------------------
|
|
202
|
+ // Typings for Provider
|
|
203
|
+ // ------------------------------------------------------------
|
|
204
|
+
|
|
205
|
+ declare export class Provider<Store> extends React$Component<{
|
|
206
|
+ store: Store,
|
|
207
|
+ children?: React$Node,
|
|
208
|
+ }> {}
|
|
209
|
+
|
|
210
|
+ declare export function createProvider(
|
|
211
|
+ storeKey?: string,
|
|
212
|
+ subKey?: string,
|
|
213
|
+ ): Class<Provider<*>>;
|
|
214
|
+
|
|
215
|
+ // ------------------------------------------------------------
|
|
216
|
+ // Typings for connectAdvanced()
|
|
217
|
+ // ------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+ declare type ConnectAdvancedOptions = {
|
|
220
|
+ getDisplayName?: (name: string) => string,
|
|
221
|
+ methodName?: string,
|
|
222
|
+ renderCountProp?: string,
|
|
223
|
+ shouldHandleStateChanges?: boolean,
|
|
224
|
+ storeKey?: string,
|
|
225
|
+ withRef?: boolean,
|
|
226
|
+ };
|
|
227
|
+
|
|
228
|
+ declare type SelectorFactoryOptions<Com> = {
|
|
229
|
+ getDisplayName: (name: string) => string,
|
|
230
|
+ methodName: string,
|
|
231
|
+ renderCountProp: ?string,
|
|
232
|
+ shouldHandleStateChanges: boolean,
|
|
233
|
+ storeKey: string,
|
|
234
|
+ withRef: boolean,
|
|
235
|
+ displayName: string,
|
|
236
|
+ wrappedComponentName: string,
|
|
237
|
+ WrappedComponent: Com,
|
|
238
|
+ };
|
|
239
|
+
|
|
240
|
+ declare type MapStateToPropsEx<S: Object, SP: Object, RSP: Object> = (
|
|
241
|
+ state: S,
|
|
242
|
+ props: SP,
|
|
243
|
+ ) => RSP;
|
|
244
|
+
|
|
245
|
+ declare type SelectorFactory<
|
|
246
|
+ Com: React$ComponentType<*>,
|
|
247
|
+ Dispatch,
|
76
|
248
|
S: Object,
|
77
|
|
- DP: Object,
|
78
|
|
- SP: Object,
|
79
|
|
- RSP: Object,
|
80
|
|
- RDP: Object,
|
81
|
|
- CP: $Diff<$Diff<ElementConfig<Com>, RSP>, RDP>
|
82
|
|
- >(
|
83
|
|
- mapStateToProps: MapStateToProps<S, SP, RSP>,
|
84
|
|
- mapDispatchToProps: MapDispatchToProps<A, DP, RDP>
|
85
|
|
- ): (component: Com) => ComponentType<CP & SP & DP>;
|
86
|
|
-
|
87
|
|
- declare export function connect<
|
88
|
|
- Com: ComponentType<*>,
|
89
|
|
- A,
|
90
|
249
|
OP: Object,
|
91
|
|
- DP: Object,
|
92
|
|
- PR: Object,
|
93
|
|
- CP: $Diff<ElementConfig<Com>, DP>
|
94
|
|
- >(
|
95
|
|
- mapStateToProps?: null,
|
96
|
|
- mapDispatchToProps: MapDispatchToProps<A, OP, DP>
|
97
|
|
- ): (Com) => ComponentType<CP & OP>;
|
98
|
|
-
|
99
|
|
- declare export function connect<
|
100
|
|
- Com: ComponentType<*>,
|
101
|
|
- MDP: Object
|
102
|
|
- >(
|
103
|
|
- mapStateToProps?: null,
|
104
|
|
- mapDispatchToProps: MDP
|
105
|
|
- ): (component: Com) => ComponentType<$Diff<ElementConfig<Com>, MDP>>;
|
106
|
|
-
|
107
|
|
- declare export function connect<
|
108
|
|
- Com: ComponentType<*>,
|
109
|
|
- S: Object,
|
110
|
|
- SP: Object,
|
111
|
|
- RSP: Object,
|
112
|
|
- MDP: Object,
|
113
|
|
- CP: $Diff<ElementConfig<Com>, RSP>
|
114
|
|
- >(
|
115
|
|
- mapStateToProps: MapStateToProps<S, SP, RSP>,
|
116
|
|
- mapDispatchToPRops: MDP
|
117
|
|
- ): (component: Com) => ComponentType<$Diff<CP, MDP> & SP>;
|
118
|
|
-
|
119
|
|
- declare export function connect<
|
120
|
|
- Com: ComponentType<*>,
|
121
|
|
- A,
|
122
|
|
- S: Object,
|
123
|
|
- DP: Object,
|
124
|
|
- SP: Object,
|
125
|
|
- RSP: Object,
|
126
|
|
- RDP: Object,
|
127
|
|
- MP: Object,
|
128
|
|
- RMP: Object,
|
129
|
|
- CP: $Diff<ElementConfig<Com>, RMP>
|
130
|
|
- >(
|
131
|
|
- mapStateToProps: MapStateToProps<S, SP, RSP>,
|
132
|
|
- mapDispatchToProps: ?MapDispatchToProps<A, DP, RDP>,
|
133
|
|
- mergeProps: MergeProps<RSP, RDP, MP, RMP>
|
134
|
|
- ): (component: Com) => ComponentType<CP & SP & DP & MP>;
|
135
|
|
-
|
136
|
|
- declare export function connect<
|
137
|
|
- Com: ComponentType<*>,
|
138
|
|
- A,
|
139
|
|
- S: Object,
|
140
|
|
- DP: Object,
|
141
|
|
- SP: Object,
|
142
|
|
- RSP: Object,
|
143
|
|
- RDP: Object,
|
144
|
|
- MDP: Object,
|
145
|
|
- MP: Object,
|
146
|
|
- RMP: Object,
|
147
|
|
- CP: $Diff<ElementConfig<Com>, RMP>
|
148
|
|
- >(
|
149
|
|
- mapStateToProps: MapStateToProps<S, SP, RSP>,
|
150
|
|
- mapDispatchToProps: MDP,
|
151
|
|
- mergeProps: MergeProps<RSP, RDP, MP, RMP>
|
152
|
|
- ): (component: Com) => ComponentType<CP & SP & DP & MP>;
|
153
|
|
-
|
154
|
|
- declare export function connect<Com: ComponentType<*>,
|
155
|
|
- A,
|
156
|
|
- S: Object,
|
157
|
|
- DP: Object,
|
158
|
|
- SP: Object,
|
159
|
|
- RSP: Object,
|
160
|
|
- RDP: Object,
|
161
|
|
- MP: Object,
|
162
|
|
- RMP: Object
|
163
|
|
- >(
|
164
|
|
- mapStateToProps: ?MapStateToProps<S, SP, RSP>,
|
165
|
|
- mapDispatchToProps: ?MapDispatchToProps<A, DP, RDP>,
|
166
|
|
- mergeProps: ?MergeProps<RSP, RDP, MP, RMP>,
|
167
|
|
- options: ConnectOptions<S, SP & DP & MP, RSP, RMP>
|
168
|
|
- ): (component: Com) => ComponentType<$Diff<ElementConfig<Com>, RMP> & SP & DP & MP>;
|
169
|
|
-
|
170
|
|
- declare export function connect<Com: ComponentType<*>,
|
171
|
|
- A,
|
|
250
|
+ EFO: Object,
|
|
251
|
+ CP: Object,
|
|
252
|
+ > = (
|
|
253
|
+ dispatch: Dispatch,
|
|
254
|
+ factoryOptions: SelectorFactoryOptions<Com> & EFO,
|
|
255
|
+ ) => MapStateToPropsEx<S, OP, CP>;
|
|
256
|
+
|
|
257
|
+ declare export function connectAdvanced<
|
|
258
|
+ Com: React$ComponentType<*>,
|
|
259
|
+ D,
|
172
|
260
|
S: Object,
|
173
|
|
- DP: Object,
|
174
|
|
- SP: Object,
|
175
|
|
- RSP: Object,
|
176
|
|
- RDP: Object,
|
177
|
|
- MDP: Object,
|
178
|
|
- MP: Object,
|
179
|
|
- RMP: Object
|
180
|
|
- >(
|
181
|
|
- mapStateToProps: ?MapStateToProps<S, SP, RSP>,
|
182
|
|
- mapDispatchToProps: ?MapDispatchToProps<A, DP, RDP>,
|
183
|
|
- mergeProps: MDP,
|
184
|
|
- options: ConnectOptions<S, SP & DP & MP, RSP, RMP>
|
185
|
|
- ): (component: Com) => ComponentType<$Diff<ElementConfig<Com>, RMP> & SP & DP & MP>;
|
|
261
|
+ OP: Object,
|
|
262
|
+ CP: Object,
|
|
263
|
+ EFO: Object,
|
|
264
|
+ ST: { [_: $Keys<Com>]: any },
|
|
265
|
+ >(
|
|
266
|
+ selectorFactory: SelectorFactory<Com, D, S, OP, EFO, CP>,
|
|
267
|
+ connectAdvancedOptions: ?(ConnectAdvancedOptions & EFO),
|
|
268
|
+ ): (component: Com) => React$ComponentType<OP> & $Shape<ST>;
|
186
|
269
|
|
187
|
270
|
declare export default {
|
188
|
271
|
Provider: typeof Provider,
|
189
|
272
|
createProvider: typeof createProvider,
|
190
|
273
|
connect: typeof connect,
|
|
274
|
+ connectAdvanced: typeof connectAdvanced,
|
191
|
275
|
};
|
192
|
276
|
}
|