/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { IMergeBlock, IMergeNode, ISegment } from "./mergeTreeNodes";
export declare const LeafAction: {
    readonly Exit: false;
};
export type LeafAction = boolean | undefined | void;
export declare const NodeAction: {
    readonly Continue: undefined;
    readonly Exit: false;
    readonly Skip: 2;
};
export type NodeAction = (typeof NodeAction)[keyof typeof NodeAction] | Exclude<LeafAction, true>;
/**
 * Does a depth first walk of the tree from the specific start.
 *
 * @param startBlock - The block of the tree to start the walk from
 * @param startChild - The child of that block to start from
 * @param downAction - Called as we walk down the tree to the leaves.
 * @param leafActionOverride - Overrides downAction for leaves, generally used without downAction
 * @param upAction - Called after all the children of a block are walked.
 * @param forward - whether to walk forward or backward
 * @returns true if we naturally exit, false if exiting due to Exit action result
 */
export declare function depthFirstNodeWalk(startBlock: IMergeBlock, startChild: IMergeNode | undefined, downAction?: (node: IMergeNode) => NodeAction, leafActionOverride?: (seg: ISegment) => LeafAction, upAction?: (block: IMergeBlock) => void, forward?: boolean): boolean;
/**
 * Visit segments starting from node's right/far/forward siblings, then up to node's parent.
 * All segments past `node` are visited, regardless of their visibility.
 */
export declare function forwardExcursion(startNode: IMergeNode, leafAction: (seg: ISegment) => boolean | undefined): boolean;
/**
 * Visit segments starting from node's left/near/backwards siblings, then up to node's parent.
 * All segments past `node` are visited, regardless of their visibility.
 */
export declare function backwardExcursion(startNode: IMergeNode, leafAction: (seg: ISegment) => boolean | undefined): boolean;
/**
 * Walks all segments below the specific start block
 * @param startBlock - The block to start the walk at
 * @param leafAction - The action to perform on the leaves
 * @returns true if we naturally exit, false if exiting due to leaf action result
 */
export declare function walkAllChildSegments(startBlock: IMergeBlock, leafAction: (segment: ISegment) => boolean | undefined | void): boolean;
//# sourceMappingURL=mergeTreeNodeWalk.d.ts.map