MCPcopy Index your code
hub / github.com/TanStack/devtools / walk

Function walk

packages/devtools-vite/src/ast-utils.ts:51–58  ·  view source on GitHub ↗
(
  node: Node,
  visitor: (node: Node, parentNode?: Node) => void,
  parentNode?: Node,
)

Source from the content-addressed store, hash-verified

49 * Recursively walk AST nodes, calling `visitor` for each node with a `type`.
50 */
51export function walk(
52 node: Node,
53 visitor: (node: Node, parentNode?: Node) => void,
54 parentNode?: Node,
55) {
56 visitor(node, parentNode)
57 forEachChild(node, (child) => walk(child, visitor, node))
58}

Callers 6

detectDevtoolsImportFunction · 0.90
transformAndInjectFunction · 0.90
ast-utils.test.tsFile · 0.90
removeDevtoolsFunction · 0.90
enhanceConsoleLogFunction · 0.90

Calls 1

forEachChildFunction · 0.85

Tested by

no test coverage detected