Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion flow-typed/redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ declare module 'redux' {

declare type Reducer<S, A> = (state: S, action: A) => S;

declare type CombinedReducer<S, A> = (state: $Shape<S> & {} | void, action: A) => S;

declare type Middleware<S, A> =
(api: MiddlewareAPI<S, A>) =>
(next: Dispatch<A>) => Dispatch<A>;
Expand All @@ -46,7 +48,7 @@ declare module 'redux' {
declare function bindActionCreators<A, C: ActionCreator<A, any>>(actionCreator: C, dispatch: Dispatch<A>): C;
declare function bindActionCreators<A, K, C: ActionCreators<K, A>>(actionCreators: C, dispatch: Dispatch<A>): C;

declare function combineReducers<O: Object, A>(reducers: O): Reducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>;
declare function combineReducers<O: Object, A>(reducers: O): CombinedReducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>;

declare function compose<S, A>(...fns: Array<StoreEnhancer<S, A>>): Function;

Expand Down