diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 008bb5b3197..ae0bb3a0302 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -531,11 +531,11 @@ module ts { case SyntaxKind.ExportAssignment: if ((node).expression.kind === SyntaxKind.Identifier) { // An export default clause with an identifier exports all meanings of that identifier - declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Alias, SymbolFlags.AliasExcludes); + declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Alias, SymbolFlags.PropertyExcludes | SymbolFlags.AliasExcludes); } else { // An export default clause with an expression exports a value - declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); + declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes | SymbolFlags.AliasExcludes); } bindChildren(node, 0, /*isBlockScopeContainer*/ false); break; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fa7706cb823..a84d0a6a8c9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -613,7 +613,7 @@ module ts { return resolveEntityName(node.expression, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace); } - function getTargetOfImportDeclaration(node: Declaration): Symbol { + function getTargetOfAliasDeclaration(node: Declaration): Symbol { switch (node.kind) { case SyntaxKind.ImportEqualsDeclaration: return getTargetOfImportEqualsDeclaration(node); @@ -640,7 +640,7 @@ module ts { if (!links.target) { links.target = resolvingSymbol; let node = getDeclarationOfAliasSymbol(symbol); - let target = getTargetOfImportDeclaration(node); + let target = getTargetOfAliasDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index bf9c38188d3..3c61ad66f83 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -848,7 +848,7 @@ module ts { node.kind === SyntaxKind.NamespaceImport || node.kind === SyntaxKind.ImportSpecifier || node.kind === SyntaxKind.ExportSpecifier || - node.kind === SyntaxKind.ExportAssignment; + node.kind === SyntaxKind.ExportAssignment && (node).expression.kind === SyntaxKind.Identifier; } export function getClassBaseTypeNode(node: ClassDeclaration) {