import { IObservable, IObserver, ITransaction } from "./base.js"; /** * Starts a transaction in which many observables can be changed at once. * {@link fn} should start with a JS Doc using `@description` to give the transaction a debug name. * Reaction run on demand or when the transaction ends. */ export declare function transaction(fn: (tx: ITransaction) => void, getDebugName?: () => string): void; export declare function globalTransaction(fn: (tx: ITransaction) => void): void; /** @deprecated */ export declare function asyncTransaction(fn: (tx: ITransaction) => Promise, getDebugName?: () => string): Promise; /** * Allows to chain transactions. */ export declare function subtransaction(tx: ITransaction | undefined, fn: (tx: ITransaction) => void, getDebugName?: () => string): void; export declare class TransactionImpl implements ITransaction { readonly _fn: Function; private readonly _getDebugName?; private _updatingObservers; constructor(_fn: Function, _getDebugName?: (() => string) | undefined); getDebugName(): string | undefined; updateObserver(observer: IObserver, observable: IObservable): void; finish(): void; debugGetUpdatingObservers(): { observer: IObserver; observable: IObservable; }[] | null; }