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

Function importedNamespaces

src/resolution/vbnet-receivers.ts:693–705  ·  view source on GitHub ↗

The namespaces a file imports — its own `Imports` and its project's — lowercased.

(file: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

691
692/** The namespaces a file imports — its own `Imports` and its project's — lowercased. */
693function 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
707const VB_ALIASES = new WeakMap<ResolutionContext, Map<string, Map<string, VbType>>>();
708

Callers 2

typesNamedAtFunction · 0.85
namespaceNamedFunction · 0.85

Calls 6

projectInfoFunction · 0.85
headerLinesFunction · 0.85
pushMethod · 0.80
getMethod · 0.65
execMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected