import type { Action } from './action.js'; /** * Represents a queue for managing and executing actions sequentially. * Allows for the execution of asynchronous actions one after another, * providing mechanisms to add actions to the queue, run them, and * optionally abort all pending actions. */ export declare class TaskQueue { #private; /** * Adds an action to the queue and starts the execution of the queue * if it is not already running. Returns a promise that resolves or rejects * with the result of the action. * @param {Action} action The action to add to the queue. * @returns {Promise} A promise that resolves or rejects with the result of the action. */ run(action: Action): Promise; /** * Requests the abortion of all pending actions in the queue. Each action's promise * will be rejected with a CancelledExecution error. Returns a promise that resolves * when all actions have been aborted. * @returns {Promise} A promise that resolves when the abort process is complete. */ abort(): Promise; }