/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKey, TreeStoredSchema } from "../../core";
import { ObjectNode, TreeContext } from "../editable-tree-2";
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, ObjectNode> {
    readonly fieldKey: FieldKey;
    private readonly nodes;
    constructor(fieldKey: FieldKey, keys?: Iterable<[LocalNodeKey, ObjectNode]>);
    /**
     * Returns true if the given schema contains the node key type, otherwise false
     */
    static hasNodeKeyTreeSchema(schema: TreeStoredSchema): 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: TreeContext): void;
    /**
     * Create a copy of this index which can be mutated without affecting this one.
     */
    clone(context: TreeContext): NodeKeyIndex;
    forEach(callbackfn: (value: ObjectNode, key: LocalNodeKey, map: ReadonlyMap<LocalNodeKey, ObjectNode>) => void, thisArg?: any): void;
    get(key: LocalNodeKey): ObjectNode | undefined;
    has(key: LocalNodeKey): boolean;
    get size(): number;
    entries(): IterableIterator<[LocalNodeKey, ObjectNode]>;
    keys(): IterableIterator<LocalNodeKey>;
    values(): IterableIterator<ObjectNode>;
    [Symbol.iterator](): IterableIterator<[LocalNodeKey, ObjectNode]>;
    private findKeys;
    private findKeysInField;
}
//# sourceMappingURL=nodeKeyIndex.d.ts.map