summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--flow-typed/npm/react-redux_v5.x.x.js64
-rw-r--r--flow-typed/npm/redux_v3.x.x.js54
2 files changed, 71 insertions, 47 deletions
diff --git a/flow-typed/npm/react-redux_v5.x.x.js b/flow-typed/npm/react-redux_v5.x.x.js
index fa3b907ca7..3536e46aeb 100644
--- a/flow-typed/npm/react-redux_v5.x.x.js
+++ b/flow-typed/npm/react-redux_v5.x.x.js
@@ -1,10 +1,9 @@
-// flow-typed signature: 8db7b853f57c51094bf0ab8b2650fd9c
-// flow-typed version: ab8db5f14d/react-redux_v5.x.x/flow_>=v0.30.x
+// flow-typed signature: c0e8d9867aff7576bb7cf63fe60a6af3
+// flow-typed version: 83053e4020/react-redux_v5.x.x/flow_>=v0.30.x <=v0.52.x
-import type { Dispatch, Store } from 'redux'
-
-declare module 'react-redux' {
+import type { Dispatch, Store } from "redux";
+declare module "react-redux" {
/*
S = State
@@ -15,32 +14,58 @@ declare module 'react-redux' {
*/
- declare type MapStateToProps<S, OP: Object, SP: Object> = (state: S, ownProps: OP) => SP | MapStateToProps<S, OP, SP>;
+ declare type MapStateToProps<S, OP: Object, SP: Object> = (
+ state: S,
+ ownProps: OP
+ ) => ((state: S, ownProps: OP) => SP) | SP;
- declare type MapDispatchToProps<A, OP: Object, DP: Object> = ((dispatch: Dispatch<A>, ownProps: OP) => DP) | DP;
+ declare type MapDispatchToProps<A, OP: Object, DP: Object> =
+ | ((dispatch: Dispatch<A>, ownProps: OP) => DP)
+ | DP;
- declare type MergeProps<SP, DP: Object, OP: Object, P: Object> = (stateProps: SP, dispatchProps: DP, ownProps: OP) => P;
+ declare type MergeProps<SP, DP: Object, OP: Object, P: Object> = (
+ stateProps: SP,
+ dispatchProps: DP,
+ ownProps: OP
+ ) => P;
declare type Context = { store: Store<*, *> };
- declare type StatelessComponent<P> = (props: P, context: Context) => ?React$Element<any>;
+ declare type StatelessComponent<P> = (
+ props: P,
+ context: Context
+ ) => ?React$Element<any>;
- declare class ConnectedComponent<OP, P, Def, St> extends React$Component<void, OP, void> {
- static WrappedComponent: Class<React$Component<Def, P, St>>;
- getWrappedInstance(): React$Component<Def, P, St>;
- static defaultProps: void;
- props: OP;
- state: void;
+ declare class ConnectedComponent<OP, P, Def, St> extends React$Component<
+ void,
+ OP,
+ void
+ > {
+ static WrappedComponent: Class<React$Component<Def, P, St>>,
+ getWrappedInstance(): React$Component<Def, P, St>,
+ static defaultProps: void,
+ props: OP,
+ state: void
}
- declare type ConnectedComponentClass<OP, P, Def, St> = Class<ConnectedComponent<OP, P, Def, St>>;
+ declare type ConnectedComponentClass<OP, P, Def, St> = Class<
+ ConnectedComponent<OP, P, Def, St>
+ >;
declare type Connector<OP, P> = {
- (component: StatelessComponent<P>): ConnectedComponentClass<OP, P, void, void>;
- <Def, St>(component: Class<React$Component<Def, P, St>>): ConnectedComponentClass<OP, P, Def, St>;
+ (
+ component: StatelessComponent<P>
+ ): ConnectedComponentClass<OP, P, void, void>,
+ <Def, St>(
+ component: Class<React$Component<Def, P, St>>
+ ): ConnectedComponentClass<OP, P, Def, St>
};
- declare class Provider<S, A> extends React$Component<void, { store: Store<S, A>, children?: any }, void> { }
+ declare class Provider<S, A> extends React$Component<
+ void,
+ { store: Store<S, A>, children?: any },
+ void
+ > {}
declare type ConnectOptions = {
pure?: boolean,
@@ -94,5 +119,4 @@ declare module 'react-redux' {
mergeProps: MergeProps<SP, DP, OP, P>,
options?: ConnectOptions
): Connector<OP, P>;
-
}
diff --git a/flow-typed/npm/redux_v3.x.x.js b/flow-typed/npm/redux_v3.x.x.js
index f6445d9cf4..5bb5fb1a42 100644
--- a/flow-typed/npm/redux_v3.x.x.js
+++ b/flow-typed/npm/redux_v3.x.x.js
@@ -1,5 +1,5 @@
-// flow-typed signature: 86993bd000012d3e1ef10d757d16952d
-// flow-typed version: a165222d28/redux_v3.x.x/flow_>=v0.33.x
+// flow-typed signature: e0393883da9eb99c94c51c728b3f1d71
+// flow-typed version: 2c04631d20/redux_v3.x.x/flow_>=v0.33.x <=v0.54.x
declare module 'redux' {
@@ -11,15 +11,15 @@ declare module 'redux' {
*/
- declare type DispatchAPI<A> = (action: A) => A;
- declare type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;
+ declare export type DispatchAPI<A> = (action: A) => A;
+ declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;
- declare type MiddlewareAPI<S, A, D = Dispatch<A>> = {
+ declare export type MiddlewareAPI<S, A, D = Dispatch<A>> = {
dispatch: D;
getState(): S;
};
- declare type Store<S, A, D = Dispatch<A>> = {
+ declare export type Store<S, A, D = Dispatch<A>> = {
// rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages)
dispatch: D;
getState(): S;
@@ -27,58 +27,58 @@ declare module 'redux' {
replaceReducer(nextReducer: Reducer<S, A>): void
};
- declare type Reducer<S, A> = (state: S, action: A) => S;
+ declare export type Reducer<S, A> = (state: S, action: A) => S;
- declare type CombinedReducer<S, A> = (state: $Shape<S> & {} | void, action: A) => S;
+ declare export type CombinedReducer<S, A> = (state: $Shape<S> & {} | void, action: A) => S;
- declare type Middleware<S, A, D = Dispatch<A>> =
+ declare export type Middleware<S, A, D = Dispatch<A>> =
(api: MiddlewareAPI<S, A, D>) =>
(next: D) => D;
- declare type StoreCreator<S, A, D = Dispatch<A>> = {
+ declare export type StoreCreator<S, A, D = Dispatch<A>> = {
(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
};
- declare type StoreEnhancer<S, A, D = Dispatch<A>> = (next: StoreCreator<S, A, D>) => StoreCreator<S, A, D>;
+ declare export type StoreEnhancer<S, A, D = Dispatch<A>> = (next: StoreCreator<S, A, D>) => StoreCreator<S, A, D>;
- declare function createStore<S, A, D>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
- declare function createStore<S, A, D>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
+ declare export function createStore<S, A, D>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
+ declare export function createStore<S, A, D>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
- declare function applyMiddleware<S, A, D>(...middlewares: Array<Middleware<S, A, D>>): StoreEnhancer<S, A, D>;
+ declare export function applyMiddleware<S, A, D>(...middlewares: Array<Middleware<S, A, D>>): StoreEnhancer<S, A, D>;
- declare type ActionCreator<A, B> = (...args: Array<B>) => A;
- declare type ActionCreators<K, A> = { [key: K]: ActionCreator<A, any> };
+ declare export type ActionCreator<A, B> = (...args: Array<B>) => A;
+ declare export type ActionCreators<K, A> = { [key: K]: ActionCreator<A, any> };
- declare function bindActionCreators<A, C: ActionCreator<A, any>, D: DispatchAPI<A>>(actionCreator: C, dispatch: D): C;
- declare function bindActionCreators<A, K, C: ActionCreators<K, A>, D: DispatchAPI<A>>(actionCreators: C, dispatch: D): C;
+ declare export function bindActionCreators<A, C: ActionCreator<A, any>, D: DispatchAPI<A>>(actionCreator: C, dispatch: D): C;
+ declare export function bindActionCreators<A, K, C: ActionCreators<K, A>, D: DispatchAPI<A>>(actionCreators: C, dispatch: D): C;
- declare function combineReducers<O: Object, A>(reducers: O): CombinedReducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>;
+ declare export function combineReducers<O: Object, A>(reducers: O): CombinedReducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>;
- declare function compose<A, B>(ab: (a: A) => B): (a: A) => B
- declare function compose<A, B, C>(
+ declare export function compose<A, B>(ab: (a: A) => B): (a: A) => B
+ declare export function compose<A, B, C>(
bc: (b: B) => C,
ab: (a: A) => B
): (a: A) => C
- declare function compose<A, B, C, D>(
+ declare export function compose<A, B, C, D>(
cd: (c: C) => D,
bc: (b: B) => C,
ab: (a: A) => B
): (a: A) => D
- declare function compose<A, B, C, D, E>(
+ declare export function compose<A, B, C, D, E>(
de: (d: D) => E,
cd: (c: C) => D,
bc: (b: B) => C,
ab: (a: A) => B
): (a: A) => E
- declare function compose<A, B, C, D, E, F>(
+ declare export function compose<A, B, C, D, E, F>(
ef: (e: E) => F,
de: (d: D) => E,
cd: (c: C) => D,
bc: (b: B) => C,
ab: (a: A) => B
): (a: A) => F
- declare function compose<A, B, C, D, E, F, G>(
+ declare export function compose<A, B, C, D, E, F, G>(
fg: (f: F) => G,
ef: (e: E) => F,
de: (d: D) => E,
@@ -86,7 +86,7 @@ declare module 'redux' {
bc: (b: B) => C,
ab: (a: A) => B
): (a: A) => G
- declare function compose<A, B, C, D, E, F, G, H>(
+ declare export function compose<A, B, C, D, E, F, G, H>(
gh: (g: G) => H,
fg: (f: F) => G,
ef: (e: E) => F,
@@ -95,7 +95,7 @@ declare module 'redux' {
bc: (b: B) => C,
ab: (a: A) => B
): (a: A) => H
- declare function compose<A, B, C, D, E, F, G, H, I>(
+ declare export function compose<A, B, C, D, E, F, G, H, I>(
hi: (h: H) => I,
gh: (g: G) => H,
fg: (f: F) => G,