switchyard
    Preparing search index...

    Interface InvokeConfig

    interface InvokeConfig {
        id?: string;
        onDone?: TransitionConfig;
        onError?: TransitionConfig;
        output?(): unknown;
        src(input: InvokeInput): unknown;
    }
    Index
    id?: string

    Defaults to <state path>:invocation[<index>].

    Taken on xstate.done.actor.<id>; the event carries output.

    Taken on xstate.error.actor.<id>; the event carries error.

    • Starts the actor. What it returns decides the kind: a promise (done with its value, or an error), an Interpreter (a child machine, done when it reaches a final state), a Subscribable (values arrive as xstate.snapshot.<id>, then done), or a cleanup function (a callback actor).

      Parameters

      Returns unknown