MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / moduleFileNode

Function moduleFileNode

src/resolution/frameworks/vue.ts:322–324  ·  view source on GitHub ↗

The file node of `file`, a path an import resolved to — none for a folder, an unindexed file or the importing file itself.

(file: string | null, ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

320
321/** The file node of `file`, a path an import resolved to — none for a folder, an unindexed file or the importing file itself. */
322function moduleFileNode(file: string | null, ref: UnresolvedRef, context: ResolutionContext): Node | undefined {
323 return file && file !== ref.filePath ? context.getNodesInFile(file).find((n) => n.kind === 'file') : undefined;
324}
325
326/** Does the reference's own file declare a function (or a const holding one) by that name? */
327function declaresOwnFunction(ref: UnresolvedRef, context: ResolutionContext): boolean {

Callers 1

resolveFunction · 0.85

Calls 1

getNodesInFileMethod · 0.65

Tested by

no test coverage detected