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

Function moduleFileNode

src/resolution/frameworks/vue.ts:323–325  ·  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

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

Callers 1

resolveFunction · 0.85

Calls 1

getNodesInFileMethod · 0.65

Tested by

no test coverage detected