diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2017-11-30 12:09:42 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2017-12-05 11:20:53 +0100 |
| commit | 677103e955ae2f9e8d27794b131cd6638a5f6d89 (patch) | |
| tree | 4017743ff0daa86e45ecf82de687197cee00036d | |
| parent | bf30196da401ca7275cb5d959f6a5fc761adfa5f (diff) | |
| download | mullvadvpn-677103e955ae2f9e8d27794b131cd6638a5f6d89.tar.xz mullvadvpn-677103e955ae2f9e8d27794b131cd6638a5f6d89.zip | |
Update flow annotations for react-redux
| -rw-r--r-- | flow-typed/npm/react-redux_v5.x.x.js | 64 |
1 files changed, 44 insertions, 20 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>; - } |
