Interface SimpleActionContext

Simplified version of action context.

interface SimpleActionContext {
    actionName: string;
    args: readonly any[];
    data: Record<symbol, any>;
    parentContext?: SimpleActionContext;
    rootContext: SimpleActionContext;
    target: AnyModel;
    type: ActionContextActionType;
}

Properties

actionName: string

Action name

args: readonly any[]

Array of action arguments.

data: Record<symbol, any>

Custom data for the action context to be set by middlewares, an object. Symbols must be used as keys to avoid name clashing between middlewares.

parentContext?: SimpleActionContext

Parent action context, if any.

rootContext: SimpleActionContext

Root action context, or itself if the root.

target: AnyModel

Action target model instance.

Action type, sync or async.