smartstate/ts/smartstate.classes.stateaction.ts

14 lines
468 B
TypeScript
Raw Normal View History

2019-02-21 20:48:39 +00:00
import * as plugins from './smartstate.plugins';
2019-02-26 17:09:38 +00:00
import { StatePart } from './smartstate.classes.statepart';
export interface IActionDef<TStateType, TActionPayloadType> {
(stateArg: StatePart<any, TStateType>, actionPayload: TActionPayloadType): Promise<TStateType>;
}
2019-02-21 20:48:39 +00:00
/**
* an actionmodifier for the state
*/
2019-02-26 17:09:38 +00:00
export class StateAction<TStateType, TActionPayloadType> {
constructor(public actionDef: IActionDef<TStateType, TActionPayloadType>) {}
2019-02-21 20:48:39 +00:00
}