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

Function isASTNode

packages/lang-core/src/parser/ast.ts:104–107  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

102
103/** Check if a value is an AST node (has a valid `k` discriminant field). */
104export function isASTNode(value: unknown): value is ASTNode {
105 if (!value || typeof value !== "object" || Array.isArray(value)) return false;
106 return AST_KINDS.has((value as Record<string, unknown>).k as string);
107}
108
109export function walkAST(node: ASTNode, visit: (node: ASTNode) => void): void {
110 const walk = (current: ASTNode) => {

Callers 5

collectQueryDepsFunction · 0.90
containsDynamicValueFunction · 0.90
serializeValueFunction · 0.90
evaluatePropCoreFunction · 0.90
substituteRefFunction · 0.90

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected