Skip to content

Commit 66b299d

Browse files
committed
refactor diagnostics
1 parent 2e99323 commit 66b299d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6288,9 +6288,9 @@ namespace ts {
62886288
// If we have an existing early-bound member, combine its declarations so that we can
62896289
// report an error at each declaration.
62906290
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
6291-
const name = (<LiteralType>type).value || declarationNameToString(decl.name)
6292-
forEach(declarations, declaration => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_declaration_0, name));
6293-
error(decl.name || decl, Diagnostics.Duplicate_declaration_0, name);
6291+
const name = (<LiteralType>type).value || declarationNameToString(decl.name);
6292+
forEach(declarations, declaration => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_property_0, name));
6293+
error(decl.name || decl, Diagnostics.Duplicate_property_0, name);
62946294
lateSymbol = createSymbol(SymbolFlags.None, memberName, CheckFlags.Late);
62956295
}
62966296
lateSymbol.nameType = type;

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@
24252425
"category": "Error",
24262426
"code": 2717
24272427
},
2428-
"Duplicate declaration '{0}'.": {
2428+
"Duplicate property '{0}'.": {
24292429
"category": "Error",
24302430
"code": 2718
24312431
},

0 commit comments

Comments
 (0)