import { combineReducers } from 'redux';

import { Registry } from '../types';

export type FluxStandardAction<
  TType extends string = any,
  TPayload = void,
  TMeta = void
> = {
  type: TType;
  payload: TPayload;
  error?: boolean;
  meta?: TMeta;
};

export type Thunk<T = void> = (
  dispatch: (action: FluxStandardAction<any, any, any> | Thunk<any>) => any,
  getState: () => ApplicationState,
  registry: Registry,
) => Promise<T>;

export type ApplicationState = {};

export const reducers = combineReducers({});
