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