(absPath: string, language: Language, line: number)
| 2295 | * strip what they need). |
| 2296 | */ |
| 2297 | export async function memberTypesForFile(absPath: string, language: Language, line: number): Promise<Map<string, string>> { |
| 2298 | const out = new Map<string, string>(); |
| 2299 | if (!supportsBranchGuards(language)) return out; |
| 2300 | const cached = await treeFor(absPath, language); |
| 2301 | if (!cached) return out; |
| 2302 | return memberTypesInTree(cached.tree.rootNode, cached.source, line); |
| 2303 | } |
| 2304 | |
| 2305 | /** {@link memberTypesForFile} over source text — the test surface. */ |
| 2306 | export async function memberTypesInSource(source: string, language: Language, line: number): Promise<Map<string, string>> { |
no test coverage detected