/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKey, SchemaData } from "../../core";
import { EditableTree, EditableTreeContext } from "../editable-tree";
import { LocalNodeKey } from "./nodeKey";
/**
 * The node key index records nodes with {@link LocalNodeKey}s and allows them to be looked up by key.
 */
export declare class NodeKeyIndex implements ReadonlyMap<LocalNodeKey, EditableTree> {
    readonly fieldKey: FieldKey;
    private readonly nodes;
    constructor(fieldKey: FieldKey, keys?: Iterable<[LocalNodeKey, EditableTree]>);
    /**
     * Returns true if the given schema contains the node key type, otherwise false
     */
    static hasNodeKeyTreeSchema(schema: SchemaData): boolean;
    /**
     * Search the tree for all nodes with keys, and record them in this index for lookup.
     * This should be called each time the tree changes; each call to scan forgets all existing keys.
     * @param context - the editable tree context in which to search for node keys
     */
    scanKeys(context: EditableTreeContext): void;
    /**
     * Create a copy of this index which can be mutated without affecting this one.
     */
    clone(context: EditableTreeContext): NodeKeyIndex;
    forEach(callbackfn: (value: EditableTree, key: LocalNodeKey, map: ReadonlyMap<LocalNodeKey, EditableTree>) => void, thisArg?: any): void;
    get(key: LocalNodeKey): EditableTree | undefined;
    has(key: LocalNodeKey): boolean;
    get size(): number;
    entries(): IterableIterator<[LocalNodeKey, EditableTree]>;
    keys(): IterableIterator<LocalNodeKey>;
    values(): IterableIterator<EditableTree>;
    [Symbol.iterator](): IterableIterator<[LocalNodeKey, EditableTree]>;
    private findKeys;
}
//# sourceMappingURL=nodeKeyIndex.d.ts.map