agsamantha/node_modules/p-queue/dist/priority-queue.d.ts

13 lines
519 B
TypeScript
Raw Normal View History

2024-10-02 15:15:21 -05:00
import { Queue, RunFunction } from './queue';
import { QueueAddOptions } from './options';
export interface PriorityQueueOptions extends QueueAddOptions {
priority?: number;
}
export default class PriorityQueue implements Queue<RunFunction, PriorityQueueOptions> {
private readonly _queue;
enqueue(run: RunFunction, options?: Partial<PriorityQueueOptions>): void;
dequeue(): RunFunction | undefined;
filter(options: Readonly<Partial<PriorityQueueOptions>>): RunFunction[];
get size(): number;
}