File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2727,8 +2727,8 @@ namespace ts {
2727
2727
throw Debug.assertNever(name, "Unknown entity name kind.");
2728
2728
}
2729
2729
Debug.assert((getCheckFlags(symbol) & CheckFlags.Instantiated) === 0, "Should never get an instantiated symbol here.");
2730
- if (isIdentifier(name) && ( symbol.flags & SymbolFlags.Alias || name.parent.kind === SyntaxKind.ExportAssignment) ) {
2731
- markSymbolOfAliasDeclarationIfResolvesToTypeOnly(getAliasDeclarationFromName (name), symbol);
2730
+ if (isIdentifier(name) && symbol.flags & SymbolFlags.Alias) {
2731
+ markSymbolOfAliasDeclarationIfResolvesToTypeOnly(getTypeOnlyAliasDeclarationFromName (name), symbol);
2732
2732
}
2733
2733
return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
2734
2734
}
Original file line number Diff line number Diff line change @@ -2766,14 +2766,13 @@ namespace ts {
2766
2766
node . kind === SyntaxKind . PropertyAssignment && isAliasableExpression ( ( node as PropertyAssignment ) . initializer ) ;
2767
2767
}
2768
2768
2769
- export function getAliasDeclarationFromName ( node : Identifier ) : Declaration | undefined {
2769
+ export function getTypeOnlyAliasDeclarationFromName ( node : Identifier ) : TypeOnlyCompatibleAliasDeclaration | undefined {
2770
2770
switch ( node . parent . kind ) {
2771
2771
case SyntaxKind . ImportClause :
2772
2772
case SyntaxKind . ImportSpecifier :
2773
2773
case SyntaxKind . NamespaceImport :
2774
2774
case SyntaxKind . ExportSpecifier :
2775
- case SyntaxKind . ExportAssignment :
2776
- return node . parent as Declaration ;
2775
+ return node . parent as TypeOnlyCompatibleAliasDeclaration ;
2777
2776
}
2778
2777
}
2779
2778
You can’t perform that action at this time.
0 commit comments