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

Function visit

ark/aot/declareNative.ts:604–621  ·  view source on GitHub ↗
(refs: readonly { path: string }[] | undefined)

Source from the content-addressed store, hash-verified

602 const excluded = new Set<string>()
603 const visited = new Set<string>()
604 const visit = (refs: readonly { path: string }[] | undefined) => {
605 if (!refs?.length) return
606 for (const { path } of refs) {
607 const refConfig =
608 /\.json$/i.test(path) ? path : join(path, "tsconfig.json")
609 const key = canonical(refConfig)
610 if (visited.has(key)) continue
611 visited.add(key)
612 try {
613 const refParsed = api.parseConfigFile(refConfig)
614 for (const fileName of refParsed.fileNames)
615 excluded.add(canonical(fileName))
616 visit(refParsed.projectReferences)
617 } catch {
618 // unreadable reference is reported by the checker itself
619 }
620 }
621 }
622 visit(references)
623 return excluded
624}

Callers 2

referencedFilesOfFunction · 0.70
discoverNativeProjectsFunction · 0.70

Calls 11

canonicalConfigPathFunction · 0.90
throwErrorFunction · 0.90
joinFunction · 0.85
testMethod · 0.80
filterMethod · 0.80
canonicalFunction · 0.70
resolveFunction · 0.70
hasMethod · 0.45
addMethod · 0.45
deleteMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected