export declare class TransactionError extends Error { } export declare class Transaction { static idInc: number; id: number; began: Boolean; finished: Boolean; error: Error; commitListeners: Array<(Transaction) => Promise>; rollbackListeners: Array<(Transaction) => Promise>; endListeners: Array<(Transaction) => Promise>; constructor(); begin(): void; hasBegun(): Boolean; markError(e: any): void; addCommitListener(f: any): void; addRollbackListener(f: any): void; addEndListener(f: any): void; /** * @return {Promise} A promise that executes all the callbacks necessary */ end(): Promise; callListeners(listeners: any): Promise | Promise<[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]>; }