smartstate/ts/smartstate.classes.stateaction.ts
2019-02-27 02:00:47 +01:00

14 lines
469 B
TypeScript

import * as plugins from './smartstate.plugins';
import { StatePart } from './smartstate.classes.statepart';
export interface IActionDef<TStateType, TActionPayloadType> {
(stateArg: StatePart<any, TStateType>, actionPayload: TActionPayloadType): Promise<TStateType>;
}
/**
* an actionmodifier for the state
*/
export class StateAction<TStateType, TActionPayloadType> {
constructor(public actionDef: IActionDef<TStateType, TActionPayloadType>) {}
}