(node: Node, context: ResolutionContext)
| 161 | * class's (`interface Repository<T>`), an enclosing class's. |
| 162 | */ |
| 163 | export 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`). */ |
| 172 | function declaredTypeParameters(node: Node, context: ResolutionContext): ReadonlyMap<string, string | undefined> { |
no test coverage detected