smartstate/ts/smartstate.classes.stateaction.ts

14 lines
469 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> {
2019-02-27 01:00:47 +00:00
(stateArg: StatePart<any, TStateType>, actionPayload: TActionPayloadType): Promise<TStateType>;
2019-02-26 17:09:38 +00:00
}
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
}