MCPcopy
hub / github.com/thesysdev/openui / collectQueryDeps

Function collectQueryDeps

packages/lang-core/src/parser/parser.ts:43–50  ·  view source on GitHub ↗
(node: unknown)

Source from the content-addressed store, hash-verified

41 * within. Used at parse time to pre-compute per-query state dependencies.
42 */
43export function collectQueryDeps(node: unknown): string[] {
44 if (!isASTNode(node)) return [];
45 const refs = new Set<string>();
46 walkAST(node, (current) => {
47 if (current.k === "StateRef") refs.add(current.n);
48 });
49 return [...refs];
50}
51
52/**
53 * Classify a raw statement + parsed expression into a typed Statement.

Callers 2

classifyStatementFunction · 0.85
extractStatementsFunction · 0.85

Calls 2

isASTNodeFunction · 0.90
walkASTFunction · 0.90

Tested by

no test coverage detected