/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import type { RevisionTag } from "../core/index.js";
/**
 * A helper class that organizes the state needed for managing nesting transactions.
 */
export declare class TransactionStack {
    private readonly stack;
    /**
     * The number of transactions currently ongoing.
     */
    get size(): number;
    /**
     * Pushes a new transaction onto the stack. That transaction becomes the current transaction.
     * @param startRevision - the revision of the latest commit when this transaction begins
     * @param disposables - an optional collection of disposable data to release after finishing a transaction
     */
    push(startRevision: RevisionTag, dispose: () => void): void;
    /**
     * Ends the current transaction. Fails if there is currently no ongoing transaction.
     * @returns The revision that the closed transaction began on.
     */
    pop(): {
        startRevision: RevisionTag;
    };
}
//# sourceMappingURL=transactionStack.d.ts.map