The namespaces a file imports — its own `Imports` and its project's — lowercased.
(file: string, context: ResolutionContext)
| 691 | |
| 692 | /** The namespaces a file imports — its own `Imports` and its project's — lowercased. */ |
| 693 | function importedNamespaces(file: string, context: ResolutionContext): string[] { |
| 694 | let memo = VB_FILE_IMPORTS.get(context); |
| 695 | if (!memo) VB_FILE_IMPORTS.set(context, (memo = new Map())); |
| 696 | const hit = memo.get(file); |
| 697 | if (hit) return hit; |
| 698 | const imports = [...projectInfo(file, context).imports]; |
| 699 | for (const line of headerLines(file, context)) { |
| 700 | const m = /^\s*Imports\s+([\w.]+)\s*$/i.exec(line); |
| 701 | if (m) imports.push(m[1]!.toLowerCase().replace(/^global\./, '')); |
| 702 | } |
| 703 | memo.set(file, imports); |
| 704 | return imports; |
| 705 | } |
| 706 | |
| 707 | const VB_ALIASES = new WeakMap<ResolutionContext, Map<string, Map<string, VbType>>>(); |
| 708 |
no test coverage detected