/** * A function that applies an inverse operation to undo a mutation. * Executed through proxy operations to maintain proper proxy state. */ export type InverseOp = () => void; /** * Context for managing rollback operations during a transaction. * @internal */ export interface RollbackContext { /** Whether rollback is still possible (proxies not invalidated, not currently rolling back) */ readonly canRollback: boolean; /** Log an inverse operation */ log(op: InverseOp): void; /** Mark that rollback is no longer possible (proxies invalidated) */ invalidate(): void; /** Execute all logged inverse operations in reverse order */ executeRollback(): void; } /** * Gets the current rollback context, if any. * @internal */ export declare function getRollbackContext(): RollbackContext | undefined; /** * Sets the active rollback context. * @internal */ export declare function setRollbackContext(ctx: RollbackContext | null): void; /** * Creates a new rollback context for tracking inverse operations. * @internal */ export declare function createRollbackContext(): RollbackContext;