webtau API
    Preparing search index...

    Function startTask

    • Start a long-running backend task without blocking the caller.

      Launches command via invoke() and returns a taskId immediately. Use pollTask(taskId) to query current state and cancelTask(taskId) to signal cancellation before the task completes.

      The optional options.onCancel callback is invoked when cancelTask() is called, allowing the consumer to propagate cancellation to the backend (e.g. by invoking a cancel command).

      Type Parameters

      • T

      Parameters

      • command: string
      • Optionalargs: Record<string, unknown>
      • Optionaloptions: StartTaskOptions

      Returns Promise<string>