source: imaps-frontend/node_modules/react-use/esm/factory/createReducer.d.ts@ 0c6b92a

main
Last change on this file since 0c6b92a was d565449, checked in by stefan toskovski <stefantoska84@…>, 3 months 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.