UNPKG

node-downloader-manager

Version:

node-downloader-manager is a simple yet powerful package manager-like download manager built with NodeJs. It allows you to download files sequentially or with a queue-based approach, handling retries and concurrency limits efficiently.

18 lines (17 loc) 510 B
import type { Task } from "../types"; declare class Queue { private heap; private activeCount; private readonly concurrencyLimit; private readonly maxRetries; private readonly log?; private readonly backOff; constructor(concurrencyLimit: number, maxRetries: number, consoleLog?: boolean, backOff?: boolean); private logger; private calculateBackoff; private heapifyUp; enqueue(task: Task): void; private heapifyDown; private runNext; } export default Queue;