Skip to content

Commit 942ca46

Browse files
Fixed duplicate diagnostic codes.
1 parent 2e5b6fe commit 942ca46

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

src/compiler/diagnosticInformationMap.generated.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ namespace ts {
140140
Property_destructuring_pattern_expected: { code: 1180, category: DiagnosticCategory.Error, key: "Property destructuring pattern expected." },
141141
Array_element_destructuring_pattern_expected: { code: 1181, category: DiagnosticCategory.Error, key: "Array element destructuring pattern expected." },
142142
A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: DiagnosticCategory.Error, key: "A destructuring declaration must have an initializer." },
143-
An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1184, category: DiagnosticCategory.Error, key: "An implementation cannot be declared in ambient contexts." },
143+
An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1183, category: DiagnosticCategory.Error, key: "An implementation cannot be declared in ambient contexts." },
144144
Modifiers_cannot_appear_here: { code: 1184, category: DiagnosticCategory.Error, key: "Modifiers cannot appear here." },
145145
Merge_conflict_marker_encountered: { code: 1185, category: DiagnosticCategory.Error, key: "Merge conflict marker encountered." },
146146
A_rest_element_cannot_have_an_initializer: { code: 1186, category: DiagnosticCategory.Error, key: "A rest element cannot have an initializer." },
@@ -190,10 +190,6 @@ namespace ts {
190190
An_export_declaration_can_only_be_used_in_a_module: { code: 1233, category: DiagnosticCategory.Error, key: "An export declaration can only be used in a module." },
191191
An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: { code: 1234, category: DiagnosticCategory.Error, key: "An ambient module declaration is only allowed at the top level in a file." },
192192
A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: { code: 1235, category: DiagnosticCategory.Error, key: "A namespace declaration is only allowed in a namespace or module." },
193-
Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning: { code: 1236, category: DiagnosticCategory.Error, key: "Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning." },
194-
with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in an async function block." },
195-
await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression is only allowed within an async function." },
196-
Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: DiagnosticCategory.Error, key: "Async functions are only available when targeting ECMAScript 6 and higher." },
197193
The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: { code: 1236, category: DiagnosticCategory.Error, key: "The return type of a property decorator function must be either 'void' or 'any'." },
198194
The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: { code: 1237, category: DiagnosticCategory.Error, key: "The return type of a parameter decorator function must be either 'void' or 'any'." },
199195
Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: { code: 1238, category: DiagnosticCategory.Error, key: "Unable to resolve signature of class decorator when called as an expression." },
@@ -204,6 +200,10 @@ namespace ts {
204200
_0_modifier_cannot_be_used_with_1_modifier: { code: 1243, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot be used with '{1}' modifier." },
205201
Abstract_methods_can_only_appear_within_an_abstract_class: { code: 1244, category: DiagnosticCategory.Error, key: "Abstract methods can only appear within an abstract class." },
206202
Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: { code: 1245, category: DiagnosticCategory.Error, key: "Method '{0}' cannot have an implementation because it is marked abstract." },
203+
Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning: { code: 1246, category: DiagnosticCategory.Error, key: "Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning." },
204+
with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: DiagnosticCategory.Error, key: "'with' statements are not allowed in an async function block." },
205+
await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: DiagnosticCategory.Error, key: "'await' expression is only allowed within an async function." },
206+
Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: DiagnosticCategory.Error, key: "Async functions are only available when targeting ECMAScript 6 and higher." },
207207
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
208208
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
209209
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
@@ -516,7 +516,7 @@ namespace ts {
516516
Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: DiagnosticCategory.Error, key: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
517517
Option_0_cannot_be_specified_without_specifying_option_1: { code: 5052, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified without specifying option '{1}'." },
518518
Option_0_cannot_be_specified_with_option_1: { code: 5053, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified with option '{1}'." },
519-
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5053, category: DiagnosticCategory.Error, key: "A 'tsconfig.json' file is already defined at: '{0}'." },
519+
A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: DiagnosticCategory.Error, key: "A 'tsconfig.json' file is already defined at: '{0}'." },
520520
Concatenate_and_emit_output_to_single_file: { code: 6001, category: DiagnosticCategory.Message, key: "Concatenate and emit output to single file." },
521521
Generates_corresponding_d_ts_file: { code: 6002, category: DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." },
522522
Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." },

src/compiler/diagnosticMessages.json

+23-24
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@
549549
},
550550
"An implementation cannot be declared in ambient contexts.": {
551551
"category": "Error",
552-
"code": 1184
552+
"code": 1183
553553
},
554554
"Modifiers cannot appear here.": {
555555
"category": "Error",
@@ -747,24 +747,6 @@
747747
"category": "Error",
748748
"code": 1235
749749
},
750-
"Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": {
751-
"category": "Error",
752-
"code": 1236
753-
},
754-
755-
756-
"'with' statements are not allowed in an async function block.": {
757-
"category": "Error",
758-
"code": 1300
759-
},
760-
"'await' expression is only allowed within an async function.": {
761-
"category": "Error",
762-
"code": 1308
763-
},
764-
"Async functions are only available when targeting ECMAScript 6 and higher.": {
765-
"category": "Error",
766-
"code": 1311
767-
},
768750
"The return type of a property decorator function must be either 'void' or 'any'.": {
769751
"category": "Error",
770752
"code": 1236
@@ -805,6 +787,23 @@
805787
"category": "Error",
806788
"code": 1245
807789
},
790+
"Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": {
791+
"category": "Error",
792+
"code": 1246
793+
},
794+
795+
"'with' statements are not allowed in an async function block.": {
796+
"category": "Error",
797+
"code": 1300
798+
},
799+
"'await' expression is only allowed within an async function.": {
800+
"category": "Error",
801+
"code": 1308
802+
},
803+
"Async functions are only available when targeting ECMAScript 6 and higher.": {
804+
"category": "Error",
805+
"code": 1311
806+
},
808807
"Duplicate identifier '{0}'.": {
809808
"category": "Error",
810809
"code": 2300
@@ -1700,23 +1699,23 @@
17001699
"Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.": {
17011700
"category": "Error",
17021701
"code": 2652
1703-
},
1702+
},
17041703
"Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.": {
17051704
"category": "Error",
17061705
"code": 2653
1707-
},
1706+
},
17081707
"Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.": {
17091708
"category": "Error",
17101709
"code": 2654
17111710
},
17121711
"Exported external package typings can only be in '.d.ts' files. Please contact the package author to update the package definition.": {
17131712
"category": "Error",
17141713
"code": 2655
1715-
},
1714+
},
17161715
"Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.": {
17171716
"category": "Error",
17181717
"code": 2656
1719-
},
1718+
},
17201719
"Import declaration '{0}' is using private name '{1}'.": {
17211720
"category": "Error",
17221721
"code": 4000
@@ -2055,7 +2054,7 @@
20552054
},
20562055
"A 'tsconfig.json' file is already defined at: '{0}'.": {
20572056
"category": "Error",
2058-
"code": 5053
2057+
"code": 5054
20592058
},
20602059

20612060
"Concatenate and emit output to single file.": {

0 commit comments

Comments
 (0)