oo-redux-utils2
Version:
Object-oriented Redux utils
13 lines (12 loc) • 679 B
TypeScript
import AbstractAction from './AbstractAction';
import { Dispatch } from './createActionDispatcher';
import { ReduxDispatch } from './ReduxDispatch';
export default abstract class Controller<TStateNamespace extends string = ''> {
protected readonly dispatch: Dispatch;
private cachedActionDispatchers;
constructor(reduxDispatch: ReduxDispatch);
dispatchWithDi(ActionClass: abstract new (...args: any[]) => AbstractAction<any, TStateNamespace>, diContainer: {
create: (...args: any[]) => Promise<any>;
}, otherArgs: Record<string, unknown>): void;
protected getCachedActionDispatchers<T extends Record<string, Function>>(actionDispatchers: T): T;
}