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

Method keepLoaded

ark/aot/flat.ts:806–811  ·  view source on GitHub ↗
(specifier: Node, module: SourceModule)

Source from the content-addressed store, hash-verified

804
805 // a module loaded by a specifier it can't read may be any
806 private keepLoaded(specifier: Node, module: SourceModule): void {
807 if (specifier.type === "Literal" && typeof specifier.value === "string") {
808 const target = this.targetOf(specifier.value, module)
809 if (target) this.keepExports(target)
810 } else for (const loaded of this.modules.values()) this.keepExports(loaded)
811 }
812
813 private keepExport(module: SourceModule, name: string): void {
814 const key = `${module.id}\0${name}`

Callers 1

keepReadMethod · 0.95

Calls 2

targetOfMethod · 0.95
keepExportsMethod · 0.95

Tested by

no test coverage detected