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

Function modulesWrittenIn

ark/aot/driver.ts:932–956  ·  view source on GitHub ↗
(
	precompiler: Precompiler,
	program: ScannedProgram
)

Source from the content-addressed store, hash-verified

930
931// each module of a program, as transforms naming it would answer
932const modulesWrittenIn = (
933 precompiler: Precompiler,
934 program: ScannedProgram
935): Record<string, ProgramModule> => {
936 const written: Record<string, ProgramModule> = {}
937 for (const id in program.modules) {
938 const { source, mappings, transformed } = program.modules[id]
939 if (!transformed) continue
940 written[id] = {
941 source,
942 mappings: mappings ?? null,
943 packages: packagesOf(precompiler, source, id),
944 answer:
945 transformedModuleOf(
946 precompiler,
947 source,
948 id,
949 undefined,
950 mappings,
951 program.key
952 ) ?? null
953 }
954 }
955 return written
956}
957
958const storedScanOf = (
959 usage: ScannedUsage,

Callers 1

answerFunction · 0.85

Calls 2

packagesOfFunction · 0.85
transformedModuleOfFunction · 0.85

Tested by

no test coverage detected