RNode: {
    collectAllIds<OtherInfo>(
        this: void,
        nodes: SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>,
    ): Set<NodeId>;
    collectAllIdsWithStop<OtherInfo>(
        this: void,
        nodes: SingleOrArrayOrNothing<RNode<OtherInfo & ParentInformation>>,
        stop: (node: RNode<OtherInfo & ParentInformation>) => boolean,
    ): Set<NodeId>;
    depth(this: void, node: RNode, idMap: Map<NodeId, RNode<object>>): number;
    directChildren<OtherInfo>(
        this: void,
        node: RNode<OtherInfo>,
    ): readonly ("<>" | RNode<OtherInfo>)[];
    directParent<OtherInfo>(
        this: void,
        node: RNode<OtherInfo & ParentInformation>,
        idMap: Map<NodeId, RNode<OtherInfo>>,
    ): undefined | RNode<OtherInfo>;
    getId(this: void, node: RNode<ParentInformation>): NodeId;
    getLocation(
        this: void,
        node: RNode,
    ):
        | undefined
        | [
            startLine: number,
            startColumn: number,
            endLine: number,
            endColumn: number,
            f?: string,
        ];
    getType(this: void, node: RNode): RType;
    lexeme<R extends RNode<ParentInformation>>(
        this: void,
        node: undefined | R,
    ): R extends { lexeme: string } ? string : undefined | string;
    name: "RNode";
    visitAst<OtherInfo = object>(
        this: void,
        nodes: SingleOrArrayOrNothing<RNode<OtherInfo>>,
        onVisit?: OnEnter<OtherInfo>,
        onExit?: OnExit<OtherInfo>,
    ): void;
}

Helper object to provide helper functions for RNodes.

Type declaration

DefaultNormalizedAstFold - for a more powerful way to traverse the normalized AST