MCPcopy Create free account
hub / github.com/arktypeio/arktype / topStatementOf

Function topStatementOf

ark/aot/flat.ts:1874–1877  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

1872}
1873
1874const topStatementOf = (node: Node): Node => {
1875 while (node.parent && node.parent.type !== "Program") node = node.parent
1876 return node
1877}
1878
1879// whether a statement calls something impure before it reads a value there
1880const callsBefore = (statement: Node, read: Node, code: string): boolean => {

Callers 1

writtenWhereReadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected