* The project types named `name` declared directly in namespace `ns` (full * segments): the caller's project's, if it has one — SCrawler's projects * share a root namespace — and null when that leaves two different types.
(ns: string[], name: string, ref: UnresolvedRef, context: ResolutionContext)
| 914 | * share a root namespace — and null when that leaves two different types. |
| 915 | */ |
| 916 | function typesInNamespace(ns: string[], name: string, ref: UnresolvedRef, context: ResolutionContext): Node[] | null { |
| 917 | const key = ns.join('.'); |
| 918 | let found = projectTypesNamed(name, context, VB_READ_TYPE_KINDS) |
| 919 | .filter((c) => fullSegments(c, context).slice(0, -1).join('.') === key); |
| 920 | const own = found.filter((c) => sameVbProject(c.filePath, ref.filePath, context)); |
| 921 | if (own.length > 0) found = own; |
| 922 | const distinct = new Set(found.map((c) => `${projectOf(c.filePath, context)}|${c.qualifiedName.toLowerCase()}`)); |
| 923 | return distinct.size > 1 ? null |
| 924 | : [...found.filter((c) => c.filePath === ref.filePath), ...found.filter((c) => c.filePath !== ref.filePath)]; |
| 925 | } |
| 926 | |
| 927 | /** A member named `name` of a `Module` declared directly in namespace `ns`, which VB.NET reads through the namespace: `Assets.Logo`. */ |
| 928 | function moduleMemberIn(ns: string[], name: string, ref: UnresolvedRef, context: ResolutionContext): Node | undefined { |
no test coverage detected