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

Function importsValues

ark/aot/graph.ts:7473–7487  ·  view source on GitHub ↗
(module: SourceModule)

Source from the content-addressed store, hash-verified

7471
7472// an import a cycle can reach this module's exports through
7473export const importsValues = (module: SourceModule): boolean => {
7474 let result = importsValuesByModule.get(module)
7475 if (result === undefined) {
7476 result = module.program.body.some(statement => {
7477 const specifier = "source" in statement && statement.source?.value
7478 return (
7479 !!specifier &&
7480 !arkPackageSpecifier.test(specifier) &&
7481 !isTypeOnly(statement)
7482 )
7483 })
7484 importsValuesByModule.set(module, result)
7485 }
7486 return result
7487}
7488
7489// e.g. `export function f() {}`, which is set before the module's body runs
7490export const isCallableBeforeBody = (fn: Node, module: SourceModule): boolean =>

Callers 3

runPointOfFunction · 0.90
isInertMethod · 0.90
isCallableBeforeBodyFunction · 0.85

Calls 4

testMethod · 0.80
isTypeOnlyFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected