Add suggestion to error message.
This commit is contained in:
parent
be44bc651c
commit
18e36b898c
3 changed files with 3 additions and 3 deletions
|
@ -10708,7 +10708,7 @@ namespace ts {
|
|||
for (let d of symbol.declarations) {
|
||||
let declarationSpaces = getDeclarationSpaces(d);
|
||||
if (declarationSpaces & commonDeclarationSpaceForDefault) {
|
||||
error(d.name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration, declarationNameToString(d.name));
|
||||
error(d.name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration, declarationNameToString(d.name));
|
||||
}
|
||||
else if (declarationSpaces & commonDeclarationSpace) {
|
||||
error(d.name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(d.name));
|
||||
|
|
|
@ -424,7 +424,7 @@ namespace ts {
|
|||
JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: { code: 2607, category: DiagnosticCategory.Error, key: "JSX element class does not support attributes because it does not have a '{0}' property" },
|
||||
The_global_type_JSX_0_may_not_have_more_than_one_property: { code: 2608, category: DiagnosticCategory.Error, key: "The global type 'JSX.{0}' may not have more than one property" },
|
||||
Cannot_emit_namespaced_JSX_elements_in_React: { code: 2650, category: DiagnosticCategory.Error, key: "Cannot emit namespaced JSX elements in React" },
|
||||
Merged_declaration_0_cannot_include_a_default_export_declaration: { code: 2651, category: DiagnosticCategory.Error, key: "Merged declaration '{0}' cannot include a default export declaration." },
|
||||
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration: { code: 2651, category: DiagnosticCategory.Error, key: "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0};' declaration." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
|
|
|
@ -1685,7 +1685,7 @@
|
|||
"category": "Error",
|
||||
"code": 2650
|
||||
},
|
||||
"Merged declaration '{0}' cannot include a default export declaration.": {
|
||||
"Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0};' declaration.": {
|
||||
"category": "Error",
|
||||
"code": 2651
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue