Interface ActionContext

Low level action context.

interface ActionContext {
    actionName: string;
    args: readonly any[];
    asyncStepType?: ActionContextAsyncStepType;
    data: Record<symbol, any>;
    parentContext?: ActionContext;
    previousAsyncStepContext?: ActionContext;
    rootContext: ActionContext;
    spawnAsyncStepContext?: ActionContext;
    target: object;
    type: ActionContextActionType;
}

Properties

actionName: string

Action name

args: readonly any[]

Array of action arguments.

Async step type, or undefined for sync actions.

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?: ActionContext

Parent action context, if any.

previousAsyncStepContext?: ActionContext

Previous async step context, undefined for sync actions or the first action of a flow.

rootContext: ActionContext

Root action context, or itself if the root.

spawnAsyncStepContext?: ActionContext

Spawn async step context, undefined for sync actions.

target: object

Action target object.

Action type, sync or async.