Documentation
    Preparing search index...

    Type Alias WorkflowOpts<U>

    WorkflowOpts: {
        run: (ctx: WorkflowContext<any>, argument: any) => Promise<any>;
    } & {
        [K in keyof U]: K extends | "workflowSubmit"
        | "workflowAttach"
        | "workflowOutput"
            ? `${K} is a reserved keyword`
            : K extends "run"
                ? U[K] extends WorkflowHandler<U[K], WorkflowContext<any>>
                    ? U[K]
                    : "An handler named 'run' must take as a first argument a WorkflowContext, and must return a Promise"
                : U[K] extends WorkflowSharedHandler<U[K], WorkflowSharedContext<any>>
                    ? U[K]
                    : "An handler other then 'run' must accept as a first argument a WorkflowSharedContext"
    }

    A workflow handlers is a type that describes the handlers for a workflow. The handlers must contain exactly one handler named 'run', and this handler must accept as a first argument a WorkflowContext. It can contain any number of additional handlers, which must accept as a first argument a WorkflowSharedContext. The handlers can not be named 'workflowSubmit', 'workflowAttach', 'workflowOutput' - as these are reserved.

    Type Parameters

    • U

    workflow for an example.