2017-06-29 12:54:02 -06:00
|
|
|
import { Everything } from "../interfaces";
|
2019-12-27 13:58:44 -07:00
|
|
|
import { Store as ReduxStore, Reducer, AnyAction } from "redux";
|
2017-07-07 07:12:14 -06:00
|
|
|
import { Actions } from "../constants";
|
2017-06-29 12:54:02 -06:00
|
|
|
|
2019-11-06 10:15:10 -07:00
|
|
|
export type Store = ReduxStore<Everything>;
|
2017-06-29 12:54:02 -06:00
|
|
|
|
|
|
|
export interface ReduxAction<T> {
|
2017-07-07 07:12:14 -06:00
|
|
|
readonly type: Actions;
|
2017-06-29 12:54:02 -06:00
|
|
|
readonly payload: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** The "getState()" function, typically passed in by Redux Thunk Middleware. */
|
|
|
|
export type GetState = () => Everything;
|
|
|
|
|
|
|
|
/** A Redux Thunk function. */
|
|
|
|
export interface Thunk {
|
2018-11-06 09:33:24 -07:00
|
|
|
(dispatch: Function, getState: GetState): unknown;
|
2017-06-29 12:54:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export type EnvName = "test" | "production" | "development" | "*";
|
2019-12-27 13:58:44 -07:00
|
|
|
|
|
|
|
export type Reducers = Reducer<Omit<Everything, "dispatch">, AnyAction>;
|