mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-23 18:48:40 -05:00
refactor diagnostics
This commit is contained in:
@@ -6288,9 +6288,9 @@ namespace ts {
|
||||
// If we have an existing early-bound member, combine its declarations so that we can
|
||||
// report an error at each declaration.
|
||||
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
|
||||
const name = (<LiteralType>type).value || declarationNameToString(decl.name)
|
||||
forEach(declarations, declaration => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_declaration_0, name));
|
||||
error(decl.name || decl, Diagnostics.Duplicate_declaration_0, name);
|
||||
const name = (<LiteralType>type).value || declarationNameToString(decl.name);
|
||||
forEach(declarations, declaration => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_property_0, name));
|
||||
error(decl.name || decl, Diagnostics.Duplicate_property_0, name);
|
||||
lateSymbol = createSymbol(SymbolFlags.None, memberName, CheckFlags.Late);
|
||||
}
|
||||
lateSymbol.nameType = type;
|
||||
|
||||
@@ -2425,7 +2425,7 @@
|
||||
"category": "Error",
|
||||
"code": 2717
|
||||
},
|
||||
"Duplicate declaration '{0}'.": {
|
||||
"Duplicate property '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2718
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user