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

Function addEdge

ark/aot/usage.ts:1496–1506  ·  view source on GitHub ↗
(
		specifier: string,
		importer: SourceModule,
		edge: ThisImportEdge
	)

Source from the content-addressed store, hash-verified

1494 const resolve = options?.resolve ?? (() => undefined)
1495 const importersById = new Map<string, ThisImportEdge[]>()
1496 const addEdge = (
1497 specifier: string,
1498 importer: SourceModule,
1499 edge: ThisImportEdge
1500 ) => {
1501 const target = resolve(specifier, importer)
1502 if (!target) return
1503 const edges = importersById.get(target.id)
1504 if (edges) edges.push(edge)
1505 else importersById.set(target.id, [edge])
1506 }
1507 let hasDynamicImport = false
1508 const uncalledKeys = new Set<string>()
1509 let hasProtoInheritance = false

Callers 1

buildThisReadsContextFunction · 0.85

Calls 4

resolveFunction · 0.70
getMethod · 0.65
pushMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected