import { ClientSession } from 'mongoose';
export declare type MutationCallback<T> = (session: ClientSession) => Promise<T>;
/**
 * Runs the provided `mutations` callback within a transaction and commits the changes to the DB
 * only when it has run successfully.
 *
 * @param mutations A callback which does DB writes and reads using the session.
 */
export declare function runInTransaction<T>(mutations: MutationCallback<T>): Promise<T>;
