From d9c6f3d6c64abe93ee9b3e71e67d72217ce36bc2 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 19 Nov 2015 13:20:58 -0800 Subject: [PATCH] invert the conditional I was asked to invert --- src/compiler/checker.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f6e1da3e9ea..d95d3e07686 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1143,15 +1143,16 @@ namespace ts { for (const id in lookupTable) { const { exportsWithDuplicate } = lookupTable[id]; // It's not an error if the file with multiple export *'s with duplicate names exports a member with that name itself - if (id !== "export=" && exportsWithDuplicate.length && !(id in symbols)) { - for (const node of exportsWithDuplicate) { - diagnostics.add(createDiagnosticForNode( - node, - Diagnostics.An_export_Asterisk_from_0_declaration_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, - lookupTable[id].specifierText, - id - )); - } + if (id === "export=" || !exportsWithDuplicate.length || id in symbols) { + continue; + } + for (const node of exportsWithDuplicate) { + diagnostics.add(createDiagnosticForNode( + node, + Diagnostics.An_export_Asterisk_from_0_declaration_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, + lookupTable[id].specifierText, + id + )); } } extendExportSymbols(symbols, nestedSymbols);