Skip to content

Commit d9c6f3d

Browse files
committed
invert the conditional I was asked to invert
1 parent 50bf3ca commit d9c6f3d

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

src/compiler/checker.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,15 +1143,16 @@ namespace ts {
11431143
for (const id in lookupTable) {
11441144
const { exportsWithDuplicate } = lookupTable[id];
11451145
// It's not an error if the file with multiple export *'s with duplicate names exports a member with that name itself
1146-
if (id !== "export=" && exportsWithDuplicate.length && !(id in symbols)) {
1147-
for (const node of exportsWithDuplicate) {
1148-
diagnostics.add(createDiagnosticForNode(
1149-
node,
1150-
Diagnostics.An_export_Asterisk_from_0_declaration_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,
1151-
lookupTable[id].specifierText,
1152-
id
1153-
));
1154-
}
1146+
if (id === "export=" || !exportsWithDuplicate.length || id in symbols) {
1147+
continue;
1148+
}
1149+
for (const node of exportsWithDuplicate) {
1150+
diagnostics.add(createDiagnosticForNode(
1151+
node,
1152+
Diagnostics.An_export_Asterisk_from_0_declaration_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,
1153+
lookupTable[id].specifierText,
1154+
id
1155+
));
11551156
}
11561157
}
11571158
extendExportSymbols(symbols, nestedSymbols);

0 commit comments

Comments
 (0)