From d8151fbd91fc3aac1299aa71e320c49d9f697d47 Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Tue, 9 Jun 2015 17:52:41 -0700 Subject: [PATCH] Give a name when binding an errant export declaration --- src/compiler/binder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 969e6dc8a4b..d411b840dce 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -663,7 +663,7 @@ module ts { function bindExportAssignment(node: ExportAssignment) { if (!container.symbol || !container.symbol.exports) { // Export assignment in some sort of block construct - bindAnonymousDeclaration(node, SymbolFlags.Alias, ""); + bindAnonymousDeclaration(node, SymbolFlags.Alias, getDeclarationName(node)); } else if (node.expression.kind === SyntaxKind.Identifier) { // An export default clause with an identifier exports all meanings of that identifier @@ -678,7 +678,7 @@ module ts { function bindExportDeclaration(node: ExportDeclaration) { if (!container.symbol || !container.symbol.exports) { // Export * in some sort of block construct - bindAnonymousDeclaration(node, SymbolFlags.ExportStar, ""); + bindAnonymousDeclaration(node, SymbolFlags.ExportStar, getDeclarationName(node)); } else if (!node.exportClause) { // All export * declarations are collected in an __export symbol