export interface Release { release(): void; } export interface Commit { commit(): Promise; } interface ReadStore { read(): Promise; } interface WriteStore { write(): Promise; } export declare function withRead(store: ReadStore, fn: (read: Read) => Return | Promise): Promise; export declare function withWriteNoImplicitCommit(store: WriteStore, fn: (write: Write) => Return | Promise): Promise; export declare function withWrite(store: WriteStore, fn: (write: Write) => Return | Promise): Promise; /** * This function takes a promise for a resource and a function that uses that * resource. It will release the resource after the function returns by calling * the `release` function */ export declare function using(x: Promise, fn: (tx: TX) => Return | Promise): Promise; export {}; //# sourceMappingURL=with-transactions.d.ts.map