File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2727,8 +2727,8 @@ namespace ts {
27272727 throw Debug.assertNever(name, "Unknown entity name kind.");
27282728 }
27292729 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);
27322732 }
27332733 return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
27342734 }
Original file line number Diff line number Diff line change @@ -2766,14 +2766,13 @@ namespace ts {
27662766 node . kind === SyntaxKind . PropertyAssignment && isAliasableExpression ( ( node as PropertyAssignment ) . initializer ) ;
27672767 }
27682768
2769- export function getAliasDeclarationFromName ( node : Identifier ) : Declaration | undefined {
2769+ export function getTypeOnlyAliasDeclarationFromName ( node : Identifier ) : TypeOnlyCompatibleAliasDeclaration | undefined {
27702770 switch ( node . parent . kind ) {
27712771 case SyntaxKind . ImportClause :
27722772 case SyntaxKind . ImportSpecifier :
27732773 case SyntaxKind . NamespaceImport :
27742774 case SyntaxKind . ExportSpecifier :
2775- case SyntaxKind . ExportAssignment :
2776- return node . parent as Declaration ;
2775+ return node . parent as TypeOnlyCompatibleAliasDeclaration ;
27772776 }
27782777 }
27792778
You can’t perform that action at this time.
0 commit comments