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

Method moduleOfNode

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

Source from the content-addressed store, hash-verified

5587
5588 // the module a node was parsed from
5589 private moduleOfNode(node: Node): SourceModule | undefined {
5590 let root = node
5591 while (root.parent) root = root.parent
5592 for (const id in this.modulesById) {
5593 const module = this.modulesById[id]
5594 if (module instanceof SourceModule && module.program === root)
5595 return module
5596 }
5597 }
5598
5599 // e.g. `type.valueOf(o)` or `User.and(o)`, which arktype reads
5600 private isArkCallee(callee: Node, module: SourceModule): boolean {

Callers 1

findElsewhereMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected