import { QueueOptions } from '../types'; /** Item of the queue. */ export interface QueueItem { /** Runs the item. */ run(...args: unknown[]): Promise; /** Arguments to pass to the item. */ args: A; /** Time when the item was added to the queue. */ time?: number; /** Time to wait until next item. */ timeout: number; } /** Queue class. */ export declare class Queue { options: QueueOptions; /** Whether the queue is paused. */ private paused; /** List of items in the queue. */ private queue; /** Creates an instance of Queue. */ constructor(options: QueueOptions); /** Starts the queue and run's the item functions. */ start(): Promise; /** Runs the next item in the queue. */ next(): Promise; /** Stops the queue. */ stop(): this; /** Resumes the queue. */ resume(): this; /** Adds an item to the queue. */ add(item: QueueItem): this; }