/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { AnchorSet, FieldKey, DetachedField, Delta, Anchor, ITreeCursorSynchronous } from "../tree";
import { IForestSubscription, ITreeSubscriptionCursor } from "./forest";
/**
 * Editing APIs.
 * @alpha
 */
export interface IEditableForest extends IForestSubscription {
    /**
     * Set of anchors this forest is tracking.
     *
     * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.
     * It is the responsibility of the called of the forest editing methods to do this, not the forest itself.
     * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to
     * update the anchors in a semantically optimal way.
     */
    readonly anchors: AnchorSet;
    /**
     * Applies the supplied Delta to the forest.
     * Does NOT update anchors.
     */
    applyDelta(delta: Delta.Root): void;
}
export declare function initializeForest(forest: IEditableForest, content: ITreeCursorSynchronous[]): void;
/**
 * Ways to refer to a node in an IEditableForest.
 * @alpha
 */
export declare type ForestLocation = ITreeSubscriptionCursor | Anchor;
/**
 * @alpha
 */
export interface TreeLocation {
    readonly range: FieldLocation | DetachedField;
    readonly index: number;
}
export declare function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation;
/**
 * Wrapper around DetachedField that can be detected at runtime.
 * @alpha
 */
export interface FieldLocation {
    readonly key: FieldKey;
    readonly parent: ForestLocation;
}
//# sourceMappingURL=editableForest.d.ts.map