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

Function viewing

ark/aot/driver.ts:806–820  ·  view source on GitHub ↗
(
	tracked: TrackedPrecompiler,
	scan?: Scan
)

Source from the content-addressed store, hash-verified

804// the precompiler, having read the program its analyses read whole: the
805// scan's a request names, or one it was given unread
806const viewing = (
807 tracked: TrackedPrecompiler,
808 scan?: Scan
809): TrackedPrecompiler => {
810 // e.g. as a scan of another program read its own since
811 if (scan && tracked.viewKey !== scan.viewKey) {
812 tracked.unread = scan.program
813 tracked.viewKey = scan.viewKey
814 }
815 if (tracked.unread) {
816 tracked.precompiler.readProgram(tracked.unread)
817 tracked.unread = undefined
818 }
819 return tracked
820}
821
822// a cache in node_modules/.cache/ark, unless the project can't keep one
823const cachesByCwd: Record<string, AnswerCache | null> = {}

Callers 2

scannedFunction · 0.85
answerFunction · 0.85

Calls 1

readProgramMethod · 0.80

Tested by

no test coverage detected