Skip to content

Commit ef6c137

Browse files
committed
add feedback from PR
1 parent 139f10f commit ef6c137

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14310,9 +14310,8 @@ namespace ts {
1431014310
continue;
1431114311
}
1431214312
const { declarations, flags } = exports[id];
14313-
let declarationLength = declarations.length;
1431414313
// 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)
14315-
if (!(flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) && (flags & SymbolFlags.TypeAlias ? declarationLength-- : true) && declarationLength > 1) {
14314+
if (!(flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) && (flags & SymbolFlags.TypeAlias ? declarations.length - 1 : declarations.length) > 1) {
1431614315
const exportedDeclarations: Declaration[] = filter(declarations, isNotOverload);
1431714316
if (exportedDeclarations.length > 1) {
1431814317
for (const declaration of exportedDeclarations) {

0 commit comments

Comments
 (0)