Add fix for crash in #18712 (#18751)

This commit is contained in:
Wesley Wigham
2017-09-25 13:07:44 -07:00
committed by GitHub
parent b4018a2ef1
commit 8f9724811d
6 changed files with 221 additions and 2 deletions

View File

@@ -19274,10 +19274,11 @@ namespace ts {
: DeclarationSpaces.ExportNamespace;
case SyntaxKind.ClassDeclaration:
case SyntaxKind.EnumDeclaration:
// A NamespaceImport declares an Alias, which is allowed to merge with other values within the module
case SyntaxKind.NamespaceImport:
return DeclarationSpaces.ExportType | DeclarationSpaces.ExportValue;
// The below options all declare an Alias, which is allowed to merge with other values within the importing module
case SyntaxKind.ImportEqualsDeclaration:
case SyntaxKind.NamespaceImport:
case SyntaxKind.ImportClause:
let result = DeclarationSpaces.None;
const target = resolveAlias(getSymbolOfNode(d));
forEach(target.declarations, d => { result |= getDeclarationSpaces(d); });