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

Function storedScanOf

ark/aot/driver.ts:958–973  ·  view source on GitHub ↗
(
	usage: ScannedUsage,
	written: Record<string, ProgramModule>
)

Source from the content-addressed store, hash-verified

956}
957
958const storedScanOf = (
959 usage: ScannedUsage,
960 written: Record<string, ProgramModule>
961): StoredScan => {
962 const texts: string[] = []
963 const places = new Map<string, string>()
964 const placeOf = (text: string) => {
965 if (!places.has(text)) places.set(text, String(texts.push(text) - 1))
966 return places.get(text)!
967 }
968 const modules = flatMorph(written, (id, module) => [
969 id,
970 withModules(module, placeOf)
971 ])
972 return { usage, modules, texts }
973}
974
975const writtenIn = ({
976 modules,

Callers 1

answerFunction · 0.85

Calls 2

flatMorphFunction · 0.90
withModulesFunction · 0.85

Tested by

no test coverage detected