agsamantha/node_modules/p-queue/dist/priority-queue.d.ts
2024-10-02 15:15:21 -05:00

12 lines
519 B
TypeScript

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;
}