Skip to content

Commit 7444b0b

Browse files
committed
Revert apparently unnecessary addition
1 parent 419dba1 commit 7444b0b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/compiler/checker.ts

+2-2
Original file line numberDiff line numberDiff 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
}

src/compiler/utilities.ts

+2-3
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)