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

Function ctxFor

__tests__/resolution.test.ts:2122–2131  ·  view source on GitHub ↗
(candidates: Node[])

Source from the content-addressed store, hash-verified

2120 line: 2, column: 0, filePath, language,
2121 });
2122 const ctxFor = (candidates: Node[]): ResolutionContext => ({
2123 getNodesInFile: () => [],
2124 getNodesByName: (name) => candidates.filter((c) => c.name === name),
2125 getNodesByQualifiedName: () => [],
2126 getNodesByKind: () => [],
2127 fileExists: () => false,
2128 readFile: () => null,
2129 getProjectRoot: () => '',
2130 getAllFiles: () => [],
2131 });
2132
2133 it('prefers the definition in the call site\'s own file (#1079)', () => {
2134 // matches[0] is the a/ definition; the call comes from b/, so it must

Callers 1

resolution.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected