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

Method isArktypeImport

ark/aot/graph.ts:5042–5048  ·  view source on GitHub ↗
(node: Node, module: SourceModule)

Source from the content-addressed store, hash-verified

5040 }
5041
5042 private isArktypeImport(node: Node, module: SourceModule): boolean {
5043 if (this.arkExportNameOf(node, module)) return true
5044 const binding = module.scopes.byId.get(node)?.binding
5045 if (binding?.kind !== "import") return false
5046 const target = this.importOf(binding, module).kind
5047 return target === "arktype" || target === "arktypeNamespace"
5048 }
5049
5050 // e.g. `() => scope(...)` passed to a function the build doesn't analyze; a
5051 // held value like `[$]` counts

Callers 3

scopeReadOfMethod · 0.95
genericCallOfMethod · 0.95
isArkCalleeMethod · 0.95

Calls 3

arkExportNameOfMethod · 0.95
importOfMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected