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

Function typeParametersInScope

src/resolution/type-parameters.ts:163–169  ·  view source on GitHub ↗
(node: Node, context: ResolutionContext)

Source from the content-addressed store, hash-verified

161 * class's (`interface Repository<T>`), an enclosing class's.
162 */
163export function typeParametersInScope(node: Node, context: ResolutionContext): ReadonlySet<string> {
164 const names = new Set<string>();
165 for (const declaration of enclosingDeclarations({ filePath: node.filePath, line: node.startLine }, context)) {
166 for (const name of declaredTypeParameters(declaration, context).keys()) names.add(name);
167 }
168 return names;
169}
170
171/** The type parameters a declaration declares, each with the default a C++ head gives it (`typename Parser = TcParser`). */
172function declaredTypeParameters(node: Node, context: ResolutionContext): ReadonlyMap<string, string | undefined> {

Callers 1

scopeOfFunction · 0.90

Calls 3

enclosingDeclarationsFunction · 0.85
declaredTypeParametersFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected