export declare class Queue {
    private queue;
    private isProcessing;
    private results;
    private cache;
    private pendingTasks;
    /**
     * 添加任务到队列
     * @param key 任务唯一标识符（用于缓存）
     * @param task 要执行的任务函数
     * @returns 任务结果的Promise
     */
    add<T>(key: string | symbol, task: () => Promise<T>): Promise<T>;
    /**
     * 获取所有已完成任务的结果
     * @returns 所有任务结果的副本
     */
    getAllResults(): {
        key: string | symbol;
        status: "fulfilled" | "rejected";
        value?: any;
        reason?: any;
    }[];
    /**
     * 获取特定任务的结果
     * @param key 任务键
     * @returns 任务结果或undefined
     */
    getResult(key: string | symbol): {
        status: "fulfilled" | "rejected";
        value?: any;
        reason?: any;
    };
    /**
     * 清除特定任务的缓存
     * @param key 要清除的任务键
     */
    clearCacheForKey(key: string | symbol): void;
    /**
     * 清除所有缓存
     */
    clearAllCache(): void;
    private processQueue;
}
