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

Method visit

ark/aot/graph.ts:5516–5526  ·  view source on GitHub ↗
(binding: Binding, module: SourceModule, held: Held)

Source from the content-addressed store, hash-verified

5514 const result: HeldExport[] = []
5515 const visited = new Set<Follow>()
5516 const visit = (binding: Binding, module: SourceModule, held: Held) => {
5517 const follow = this.followOf(binding, module, held)
5518 if (visited.has(follow)) return
5519 visited.add(follow)
5520 for (const name of binding.exportNames) result.push([module, name, held])
5521 for (const holding of follow.holdings) {
5522 if ("binding" in holding)
5523 visit(holding.binding, holding.module, holding.held)
5524 else result.push([holding.module, holding.name, holding.held])
5525 }
5526 }
5527 visit(binding, module, held)
5528 return result
5529 }

Callers

nothing calls this directly

Calls 5

followOfMethod · 0.95
visitFunction · 0.70
hasMethod · 0.45
addMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected