import { any } from 'prop-types';

const isDev = process.env.NODE_ENV === 'development';

interface Action {
  type: string;
  payload?: any;
  [key: string]: any;
}

const dispatch = (action: Action) => window.g_app._store.dispatch(action);

const getState = () => window.g_app._store.getState();

export { isDev, dispatch, getState };

export default { isDev, dispatch, getState };
