@dynatrace/devkit
Version:
The Dynatrace App Toolkit utilities for writing and testing migrations.
6 lines (5 loc) • 452 B
TypeScript
import type { SyntaxKind, Node } from 'typescript';
/** Find all nodes from the AST in the subtree of node of SyntaxKind kind. */
export declare function findNodes(node: Node, kind: SyntaxKind, max?: number, recursive?: boolean): Node[];
/** Find all nodes from the AST in the subtree that satisfy a type guard. */
export declare function findNodes<T extends Node>(node: Node, guard: (node: Node) => node is T, max?: number, recursive?: boolean): T[];