1 | import BaseError from '../../errors/base-error';
|
2 | /**
|
3 | * Thrown when a connection to a database is closed while an operation is in progress
|
4 | */
|
5 | export declare class AsyncQueueError extends BaseError {
|
6 | constructor(message: string);
|
7 | }
|
8 | declare 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 | }
|
16 | export default AsyncQueue;
|