UNPKG

510 BTypeScriptView Raw
1import BaseError from '../../errors/base-error';
2/**
3 * Thrown when a connection to a database is closed while an operation is in progress
4 */
5export declare class AsyncQueueError extends BaseError {
6 constructor(message: string);
7}
8declare class AsyncQueue {
9 previous: Promise<unknown>;
10 closed: boolean;
11 rejectCurrent: (reason?: any) => void;
12 constructor();
13 close(): void;
14 enqueue(asyncFunction: (...args: any[]) => Promise<unknown>): Promise<unknown>;
15}
16export default AsyncQueue;