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

Function withoutBuilt

ark/aot/unplugin.ts:2278–2289  ·  view source on GitHub ↗
(
	program: ScannedProgram
)

Source from the content-addressed store, hash-verified

2276// a program without each module as the loaders after the plugin built it,
2277// which it reads only once it wrote the program
2278const withoutBuilt = (
2279 program: ScannedProgram
2280): [program: ScannedProgram, built: Record<string, string>] => {
2281 const built: Record<string, string> = {}
2282 const modules: Record<string, ScannedModule> = {}
2283 for (const id in program.modules) {
2284 const { built: code, ...module } = program.modules[id]
2285 modules[id] = module
2286 if (code !== undefined) built[id] = code
2287 }
2288 return [{ ...program, modules }, built]
2289}
2290
2291// each module a compilation's entries reach, as the plugin reads them
2292const builtEntriesOf = (

Callers 1

answerBuiltFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected