webtau API
    Preparing search index...

    Interface StartTaskOptions

    interface StartTaskOptions {
        onCancel?: () => void | Promise<void>;
    }
    Index

    Properties

    Properties

    onCancel?: () => void | Promise<void>

    Called when cancelTask() is invoked for this task. Use this to propagate cancellation to the backend, e.g. by invoking a cancel command or aborting an in-flight request.

    const taskId = await startTask("heavy_op", { slot: 1 }, {
    onCancel: () => invoke("cancel_heavy_op", { taskId }),
    });