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

Function loadedSourceOf

ark/aot/scope.ts:941–949  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

939}
940
941export const loadedSourceOf = (node: Node): Node | undefined =>
942 node.type === "ImportExpression" ? node.source
943 : (
944 node.type === "CallExpression" &&
945 node.callee.type === "Identifier" &&
946 node.callee.name === "require"
947 ) ?
948 node.arguments[0]
949 : undefined
950
951// an object literal property's key, where it's a name
952export const propertyKeyOf = (property: {

Callers 6

keepReadMethod · 0.90
importedBakesOfMethod · 0.90
sourceOfFunction · 0.90
readsOnlyRuntimeMethod · 0.90
entryOfFunction · 0.90
loadedSpecifierOfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected