@wxn0brp/db
Version:
A simple file-based database management system with support for CRUD operations, custom queries, and graph structures.
29 lines (28 loc) • 647 B
TypeScript
interface Task {
func: Function;
param: any[];
resolve: Function;
reject: Function;
}
/**
* A simple executor for queuing and executing asynchronous operations sequentially.
* @class
*/
declare class executorC {
quote: Task[];
isExecuting: boolean;
/**
* Create a new executor instance.
* @constructor
*/
constructor();
/**
* Add an asynchronous operation to the execution queue.
*/
addOp(func: Function, ...param: any[]): Promise<unknown>;
/**
* Execute the queued asynchronous operations sequentially.
*/
execute(): Promise<void>;
}
export default executorC;