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

Function nodesInFileNamed

src/resolution/import-resolver.ts:162–164  ·  view source on GitHub ↗

The file's nodes named `name`, in `getNodesInFile` order.

(filePath: string, name: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

160
161/** The file's nodes named `name`, in `getNodesInFile` order. */
162function nodesInFileNamed(filePath: string, name: string, context: ResolutionContext): Node[] {
163 return context.getNodesInFileNamed?.(filePath, name) ?? context.getNodesInFile(filePath).filter((n) => n.name === name);
164}
165
166/** The declaration `export default NAME` names in this file (see FileExportIndex.defaultBinding). */
167function defaultExportBindingNode(filePath: string, idx: FileExportIndex, context: ResolutionContext): Node | undefined {

Callers 3

defaultExportBindingNodeFunction · 0.85
exportedByNameFunction · 0.85
findExportedSymbolWalkFunction · 0.85

Calls 2

getNodesInFileNamedMethod · 0.80
getNodesInFileMethod · 0.65

Tested by

no test coverage detected