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

Function enclosingFunctionOf

ark/aot/graph.ts:7513–7516  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

7511}
7512
7513export const enclosingFunctionOf = (node: Node): FunctionNode | undefined => {
7514 for (let parent = node.parent; parent; parent = parent.parent)
7515 if (isFunctionNode(parent)) return parent
7516}
7517
7518const stepsByModule = new WeakMap<SourceModule, Map<Node, number>>()
7519

Callers 8

emitDropFunction · 0.90
readBindingMethod · 0.90
readAtMethod · 0.90
findSitesFunction · 0.90
depthOfFunction · 0.90
reachesMethod · 0.85
mayWriteFromMethod · 0.85

Calls 1

isFunctionNodeFunction · 0.85

Tested by

no test coverage detected