/** Removes all tasks waiting to be processed, calls each task's callback with an abort error (rejects promises for promise-based queues), and resets `drain` to an empty function. */
/** Set a global error handler. `handler(err, task)` will be called each time a task is completed, `err` will be not null if the task has thrown an error. */
error(handler: errorHandler<T>):void
/** Property that returns the number of concurrent tasks that could be executed in parallel. It can be altered at runtime. */
concurrency: number
/** Property (Read-Only) that returns `true` when the queue is in a paused state. */
readonlypaused: boolean
/** Function that will be called when the last item from the queue has been processed by a worker. It can be altered at runtime. */
drain():any
/** Function that will be called when the last item from the queue has been assigned to a worker. It can be altered at runtime. */
empty:()=>void
/** Function that will be called when the queue hits the concurrency limit. It can be altered at runtime. */
/** Add a task at the end of the queue. The returned `Promise` will be fulfilled (rejected) when the task is completed successfully (unsuccessfully). */
push(task: T):Promise<R>
/** Add a task at the beginning of the queue. The returned `Promise` will be fulfilled (rejected) when the task is completed successfully (unsuccessfully). */
unshift(task: T):Promise<R>
/** Wait for the queue to be drained. The returned `Promise` will be resolved when all tasks in the queue have been processed by a worker. */