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

Function declaresOwnFunction

src/resolution/frameworks/vue.ts:327–331  ·  view source on GitHub ↗

Does the reference's own file declare a function (or a const holding one) by that name?

(ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

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 {
328 return context
329 .getNodesInFile(ref.filePath)
330 .some((n) => n.name === ref.referenceName && (n.kind === 'function' || n.kind === 'constant' || n.kind === 'variable'));
331}
332
333/**
334 * Check if string is PascalCase

Callers 2

resolveFunction · 0.85
ownsReferenceFunction · 0.85

Calls 1

getNodesInFileMethod · 0.65

Tested by

no test coverage detected