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

Function isComponentStatement

packages/lang-core/src/parser/parser.ts:152–162  ·  view source on GitHub ↗
(
  stmt: Statement,
)

Source from the content-addressed store, hash-verified

150const DEFAULT_ROOT_STATEMENT_ID = "root";
151
152function isComponentStatement(
153 stmt: Statement,
154): stmt is Extract<Statement, { kind: "value" }> & { expr: Extract<ASTNode, { k: "Comp" }> } {
155 return (
156 stmt.kind === "value" &&
157 stmt.expr.k === "Comp" &&
158 !isBuiltin(stmt.expr.name) &&
159 stmt.expr.name !== RESERVED_CALLS.Query &&
160 stmt.expr.name !== RESERVED_CALLS.Mutation
161 );
162}
163
164function pickEntryId(
165 stmtMap: Map<string, Statement>,

Callers 1

pickEntryIdFunction · 0.85

Calls 1

isBuiltinFunction · 0.90

Tested by

no test coverage detected