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

Function withModules

ark/aot/driver.ts:984–996  ·  view source on GitHub ↗
(
	module: ProgramModule,
	map: (text: string) => string
)

Source from the content-addressed store, hash-verified

982 ])
983
984const withModules = (
985 module: ProgramModule,
986 map: (text: string) => string
987): ProgramModule => ({
988 ...module,
989 answer: module.answer && {
990 ...module.answer,
991 modules: flatMorph(module.answer.modules, (specifier, text) => [
992 specifier,
993 map(text)
994 ])
995 }
996})
997
998const hasDiagnostics = (transformed: TransformedModule) =>
999 transformed.errors.length > 0 || transformed.warnings.length > 0

Callers 2

storedScanOfFunction · 0.85
writtenInFunction · 0.85

Calls 2

flatMorphFunction · 0.90
mapFunction · 0.85

Tested by

no test coverage detected