import { Node } from "../model/model"; import { Position } from "../model/position"; declare module '../model/model' { interface Node { /** * @param position the position where to search for nodes * @param selfContained whether the starting node position contains the positions of all its children. * If **true** no further search will be performed in subtrees where the root node falls outside the given position. * If **false (default)** the research will cover all nodes from the starting node to the leaves. * @return the node most closely containing the given [position]. `undefined` if none is found. * @see searchByPosition */ findByPosition(position: Position, selfContained?: boolean): Node | undefined; /** * @param position the position where to search for nodes * @param selfContained whether the starting node position contains the positions of all its children. * If **true**: no further search will be performed in subtrees where the root node falls outside the given position. * * If **false (default)**: the search will cover all nodes from the starting node to the leaves. * In any case, the search stops at the first subtree found to be containing the position. * @return all nodes containing the given [position] using depth-first search. Empty list if none are found. */ searchByPosition(position: Position, selfContained?: boolean): Generator; /** * @param position the position within which the walk should remain * @return walks the AST within the given [position] starting from this node, depth-first. */ walkWithin(position: Position): Generator; } } export declare function findByPosition(node: Node, position: Position, selfContained?: boolean): Node | undefined; export declare function searchByPosition(node: Node, position: Position, selfContained?: boolean): Generator; export declare function walkWithin(node: Node, position: Position): Generator;