File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5665,19 +5665,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
5665
5665
if (getSymbolIfSameReference(exported, symbol)) {
5666
5666
return exported;
5667
5667
}
5668
- if (symbol.flags & SymbolFlags.TypeAlias && exported.declarations?.find(isTypeAlias)) {
5669
- const aliasSymbol = getDeclaredTypeOfTypeAlias(exported).aliasSymbol;
5670
- if (aliasSymbol && getSymbolIfSameReference(aliasSymbol, symbol)) {
5671
- return exported;
5672
- }
5673
- }
5674
5668
});
5675
5669
}
5676
5670
5677
5671
/**
5678
5672
* Checks if two symbols, through aliasing and/or merging, refer to the same thing
5679
5673
*/
5680
5674
function getSymbolIfSameReference(s1: Symbol, s2: Symbol) {
5675
+ if (s1.flags & SymbolFlags.TypeAlias && s2.declarations?.find(isTypeAlias)) {
5676
+ s2 = getDeclaredTypeOfTypeAlias(s2).aliasSymbol || s2;
5677
+ }
5678
+ if (s2.flags & SymbolFlags.TypeAlias && s1.declarations?.find(isTypeAlias)) {
5679
+ s1 = getDeclaredTypeOfTypeAlias(s1).aliasSymbol || s1;
5680
+ }
5681
5681
if (getMergedSymbol(resolveSymbol(getMergedSymbol(s1))) === getMergedSymbol(resolveSymbol(getMergedSymbol(s2)))) {
5682
5682
return s1;
5683
5683
}
You can’t perform that action at this time.
0 commit comments