import type { ActionMiddlewareDisposer } from "../action/middleware";
import type { AnyModel } from "../model/BaseModel";
/**
 * Creates a transaction middleware, which reverts changes made by an action / child
 * actions when the root action throws an exception by applying inverse patches.
 *
 * @typeparam M Model
 * @param target Object with the root target model object (`model`) and root action name (`actionName`).
 * @returns The middleware disposer.
 */
export declare function transactionMiddleware<M extends AnyModel>(target: {
    model: M;
    actionName: keyof M;
}): ActionMiddlewareDisposer;
/**
 * Transaction middleware as a decorator.
 *
 * @param target
 * @param propertyKey
 */
export declare function transaction(target: any, propertyKey: string): void;
