File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5626,7 +5626,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
56265626 return undefined;
56275627 }
56285628 const containers = mapDefined(candidates, candidate => getAliasForSymbolInContainer(candidate, symbol) ? candidate : undefined);
5629- return containers.length === 1 ? getWithAlternativeContainers(containers[0]) : containers;
5629+
5630+ let bestContainers: Symbol[] = [];
5631+ let alternativeContainers: Symbol[] = [];
5632+
5633+ for (const container of containers) {
5634+ const [bestMatch, ...rest] = getWithAlternativeContainers(container);
5635+ bestContainers = append(bestContainers, bestMatch);
5636+ alternativeContainers = addRange(alternativeContainers, rest);
5637+ }
5638+
5639+ return concatenate(bestContainers, alternativeContainers);
56305640
56315641 function getWithAlternativeContainers(container: Symbol) {
56325642 const additionalContainers = mapDefined(container.declarations, fileSymbolIfFileSymbolExportEqualsContainer);
You can’t perform that action at this time.
0 commit comments