From ef6c137f9e73d29833fb443a0ff604a44a6162a1 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 10 Dec 2015 19:55:08 -0800 Subject: [PATCH] add feedback from PR --- src/compiler/checker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1073e8eda9b..666d983bd52 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14310,9 +14310,8 @@ namespace ts { continue; } const { declarations, flags } = exports[id]; - let declarationLength = declarations.length; // ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries. (TS Exceptions: namespaces, function overloads, enums, and interfaces) - if (!(flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) && (flags & SymbolFlags.TypeAlias ? declarationLength-- : true) && declarationLength > 1) { + if (!(flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) && (flags & SymbolFlags.TypeAlias ? declarations.length - 1 : declarations.length) > 1) { const exportedDeclarations: Declaration[] = filter(declarations, isNotOverload); if (exportedDeclarations.length > 1) { for (const declaration of exportedDeclarations) {