source: imaps-frontend/node_modules/react-use/lib/factory/createReducer.d.ts@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 544 bytes
Line 
1declare type Dispatch<Action> = (action: Action) => void;
2interface Store<Action, State> {
3 getState: () => State;
4 dispatch: Dispatch<Action>;
5}
6declare type Middleware<Action, State> = (store: Store<Action, State>) => (next: Dispatch<Action>) => (action: Action) => void;
7declare const createReducer: <Action, State>(...middlewares: Middleware<Action, State>[]) => (reducer: (state: State, action: Action) => State, initialState: State, initializer?: (value: State) => State) => [State, Dispatch<Action>];
8export default createReducer;
Note: See TracBrowser for help on using the repository browser.