UNPKG

bun-downloader-manager

Version:

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

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