UNPKG

280 BTypeScriptView Raw
1export type RunFunction = () => Promise<unknown>;
2export type Queue<Element, Options> = {
3 size: number;
4 filter: (options: Readonly<Partial<Options>>) => Element[];
5 dequeue: () => Element | undefined;
6 enqueue: (run: Element, options?: Partial<Options>) => void;
7};