You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler/diagnosticInformationMap.generated.ts
+23-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,12 @@ namespace ts {
29
29
Statements_are_not_allowed_in_ambient_contexts: {code: 1036,category: DiagnosticCategory.Error,key: "Statements are not allowed in ambient contexts."},
30
30
A_declare_modifier_cannot_be_used_in_an_already_ambient_context: {code: 1038,category: DiagnosticCategory.Error,key: "A 'declare' modifier cannot be used in an already ambient context."},
31
31
Initializers_are_not_allowed_in_ambient_contexts: {code: 1039,category: DiagnosticCategory.Error,key: "Initializers are not allowed in ambient contexts."},
32
+
_0_modifier_cannot_be_used_in_an_ambient_context: {code: 1040,category: DiagnosticCategory.Error,key: "'{0}' modifier cannot be used in an ambient context."},
33
+
_0_modifier_cannot_be_used_with_a_class_declaration: {code: 1041,category: DiagnosticCategory.Error,key: "'{0}' modifier cannot be used with a class declaration."},
34
+
_0_modifier_cannot_be_used_here: {code: 1042,category: DiagnosticCategory.Error,key: "'{0}' modifier cannot be used here."},
35
+
_0_modifier_cannot_appear_on_a_data_property: {code: 1043,category: DiagnosticCategory.Error,key: "'{0}' modifier cannot appear on a data property."},
32
36
_0_modifier_cannot_appear_on_a_module_element: {code: 1044,category: DiagnosticCategory.Error,key: "'{0}' modifier cannot appear on a module element."},
37
+
A_0_modifier_cannot_be_used_with_an_interface_declaration: {code: 1045,category: DiagnosticCategory.Error,key: "A '{0}' modifier cannot be used with an interface declaration."},
33
38
A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: {code: 1046,category: DiagnosticCategory.Error,key: "A 'declare' modifier is required for a top level declaration in a .d.ts file."},
34
39
A_rest_parameter_cannot_be_optional: {code: 1047,category: DiagnosticCategory.Error,key: "A rest parameter cannot be optional."},
35
40
A_rest_parameter_cannot_have_an_initializer: {code: 1048,category: DiagnosticCategory.Error,key: "A rest parameter cannot have an initializer."},
@@ -38,12 +43,18 @@ namespace ts {
38
43
A_set_accessor_parameter_cannot_have_an_initializer: {code: 1052,category: DiagnosticCategory.Error,key: "A 'set' accessor parameter cannot have an initializer."},
39
44
A_set_accessor_cannot_have_rest_parameter: {code: 1053,category: DiagnosticCategory.Error,key: "A 'set' accessor cannot have rest parameter."},
40
45
A_get_accessor_cannot_have_parameters: {code: 1054,category: DiagnosticCategory.Error,key: "A 'get' accessor cannot have parameters."},
46
+
Type_0_is_not_a_valid_async_function_return_type: {code: 1055,category: DiagnosticCategory.Error,key: "Type '{0}' is not a valid async function return type."},
41
47
Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: {code: 1056,category: DiagnosticCategory.Error,key: "Accessors are only available when targeting ECMAScript 5 and higher."},
48
+
An_async_function_or_method_must_have_a_valid_awaitable_return_type: {code: 1057,category: DiagnosticCategory.Error,key: "An async function or method must have a valid awaitable return type."},
49
+
Operand_for_await_does_not_have_a_valid_callable_then_member: {code: 1058,category: DiagnosticCategory.Error,key: "Operand for 'await' does not have a valid callable 'then' member."},
50
+
Return_expression_in_async_function_does_not_have_a_valid_callable_then_member: {code: 1059,category: DiagnosticCategory.Error,key: "Return expression in async function does not have a valid callable 'then' member."},
51
+
Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member: {code: 1060,category: DiagnosticCategory.Error,key: "Expression body for async arrow function does not have a valid callable 'then' member."},
42
52
Enum_member_must_have_initializer: {code: 1061,category: DiagnosticCategory.Error,key: "Enum member must have initializer."},
53
+
_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: {code: 1062,category: DiagnosticCategory.Error,key: "{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method."},
43
54
An_export_assignment_cannot_be_used_in_a_namespace: {code: 1063,category: DiagnosticCategory.Error,key: "An export assignment cannot be used in a namespace."},
44
55
Ambient_enum_elements_can_only_have_integer_literal_initializers: {code: 1066,category: DiagnosticCategory.Error,key: "Ambient enum elements can only have integer literal initializers."},
45
56
Unexpected_token_A_constructor_method_accessor_or_property_was_expected: {code: 1068,category: DiagnosticCategory.Error,key: "Unexpected token. A constructor, method, accessor, or property was expected."},
46
-
A_declare_modifier_cannot_be_used_with_an_import_declaration: {code: 1079,category: DiagnosticCategory.Error,key: "A 'declare' modifier cannot be used with an import declaration."},
57
+
A_0_modifier_cannot_be_used_with_an_import_declaration: {code: 1079,category: DiagnosticCategory.Error,key: "A '{0}' modifier cannot be used with an import declaration."},
Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: {code: 1085,category: DiagnosticCategory.Error,key: "Octal literals are not available when targeting ECMAScript 5 and higher."},
49
60
An_accessor_cannot_be_declared_in_an_ambient_context: {code: 1086,category: DiagnosticCategory.Error,key: "An accessor cannot be declared in an ambient context."},
@@ -179,6 +190,10 @@ namespace ts {
179
190
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."},
180
191
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."},
181
192
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."},
182
197
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'."},
183
198
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'."},
184
199
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."},
@@ -393,6 +408,11 @@ namespace ts {
393
408
Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: {code: 2515,category: DiagnosticCategory.Error,key: "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."},
394
409
All_declarations_of_an_abstract_method_must_be_consecutive: {code: 2516,category: DiagnosticCategory.Error,key: "All declarations of an abstract method must be consecutive."},
395
410
Constructor_objects_of_abstract_type_cannot_be_assigned_to_constructor_objects_of_non_abstract_type: {code: 2517,category: DiagnosticCategory.Error,key: "Constructor objects of abstract type cannot be assigned to constructor objects of non-abstract type"},
411
+
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: {code: 2520,category: DiagnosticCategory.Error,key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."},
412
+
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: {code: 2521,category: DiagnosticCategory.Error,key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions."},
413
+
The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: {code: 2522,category: DiagnosticCategory.Error,key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression."},
414
+
yield_expressions_cannot_be_used_in_a_parameter_initializer: {code: 2523,category: DiagnosticCategory.Error,key: "'yield' expressions cannot be used in a parameter initializer."},
415
+
await_expressions_cannot_be_used_in_a_parameter_initializer: {code: 2524,category: DiagnosticCategory.Error,key: "'await' expressions cannot be used in a parameter initializer."},
396
416
JSX_element_attributes_type_0_must_be_an_object_type: {code: 2600,category: DiagnosticCategory.Error,key: "JSX element attributes type '{0}' must be an object type."},
397
417
The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: {code: 2601,category: DiagnosticCategory.Error,key: "The return type of a JSX element constructor must return an object type."},
398
418
JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: {code: 2602,category: DiagnosticCategory.Error,key: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."},
@@ -549,6 +569,8 @@ namespace ts {
549
569
Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified: {code: 6064,category: DiagnosticCategory.Error,key: "Option 'experimentalDecorators' must also be specified when option 'emitDecoratorMetadata' is specified."},
550
570
Enables_experimental_support_for_ES7_decorators: {code: 6065,category: DiagnosticCategory.Message,key: "Enables experimental support for ES7 decorators."},
551
571
Enables_experimental_support_for_emitting_type_metadata_for_decorators: {code: 6066,category: DiagnosticCategory.Message,key: "Enables experimental support for emitting type metadata for decorators."},
572
+
Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower: {code: 6067,category: DiagnosticCategory.Message,key: "Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower."},
573
+
Enables_experimental_support_for_ES7_async_functions: {code: 6068,category: DiagnosticCategory.Message,key: "Enables experimental support for ES7 async functions."},
552
574
Variable_0_implicitly_has_an_1_type: {code: 7005,category: DiagnosticCategory.Error,key: "Variable '{0}' implicitly has an '{1}' type."},
553
575
Parameter_0_implicitly_has_an_1_type: {code: 7006,category: DiagnosticCategory.Error,key: "Parameter '{0}' implicitly has an '{1}' type."},
554
576
Member_0_implicitly_has_an_1_type: {code: 7008,category: DiagnosticCategory.Error,key: "Member '{0}' implicitly has an '{1}' type."},
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json
+91-1
Original file line number
Diff line number
Diff line change
@@ -103,10 +103,30 @@
103
103
"category": "Error",
104
104
"code": 1039
105
105
},
106
+
"'{0}' modifier cannot be used in an ambient context.": {
107
+
"category": "Error",
108
+
"code": 1040
109
+
},
110
+
"'{0}' modifier cannot be used with a class declaration.": {
111
+
"category": "Error",
112
+
"code": 1041
113
+
},
114
+
"'{0}' modifier cannot be used here.": {
115
+
"category": "Error",
116
+
"code": 1042
117
+
},
118
+
"'{0}' modifier cannot appear on a data property.": {
119
+
"category": "Error",
120
+
"code": 1043
121
+
},
106
122
"'{0}' modifier cannot appear on a module element.": {
107
123
"category": "Error",
108
124
"code": 1044
109
125
},
126
+
"A '{0}' modifier cannot be used with an interface declaration.": {
127
+
"category": "Error",
128
+
"code": 1045
129
+
},
110
130
"A 'declare' modifier is required for a top level declaration in a .d.ts file.": {
111
131
"category": "Error",
112
132
"code": 1046
@@ -139,14 +159,38 @@
139
159
"category": "Error",
140
160
"code": 1054
141
161
},
162
+
"Type '{0}' is not a valid async function return type.": {
163
+
"category": "Error",
164
+
"code": 1055
165
+
},
142
166
"Accessors are only available when targeting ECMAScript 5 and higher.": {
143
167
"category": "Error",
144
168
"code": 1056
145
169
},
170
+
"An async function or method must have a valid awaitable return type.": {
171
+
"category": "Error",
172
+
"code": 1057
173
+
},
174
+
"Operand for 'await' does not have a valid callable 'then' member.": {
175
+
"category": "Error",
176
+
"code": 1058
177
+
},
178
+
"Return expression in async function does not have a valid callable 'then' member.": {
179
+
"category": "Error",
180
+
"code": 1059
181
+
},
182
+
"Expression body for async arrow function does not have a valid callable 'then' member.": {
183
+
"category": "Error",
184
+
"code": 1060
185
+
},
146
186
"Enum member must have initializer.": {
147
187
"category": "Error",
148
188
"code": 1061
149
189
},
190
+
"{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method.": {
191
+
"category": "Error",
192
+
"code": 1062
193
+
},
150
194
"An export assignment cannot be used in a namespace.": {
151
195
"category": "Error",
152
196
"code": 1063
@@ -159,7 +203,7 @@
159
203
"category": "Error",
160
204
"code": 1068
161
205
},
162
-
"A 'declare' modifier cannot be used with an import declaration.": {
206
+
"A '{0}' modifier cannot be used with an import declaration.": {
163
207
"category": "Error",
164
208
"code": 1079
165
209
},
@@ -703,6 +747,24 @@
703
747
"category": "Error",
704
748
"code": 1235
705
749
},
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
+
},
706
768
"The return type of a property decorator function must be either 'void' or 'any'.": {
707
769
"category": "Error",
708
770
"code": 1236
@@ -1559,6 +1621,26 @@
1559
1621
"category": "Error",
1560
1622
"code":2517
1561
1623
},
1624
+
"Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": {
1625
+
"category": "Error",
1626
+
"code": 2520
1627
+
},
1628
+
"Expression resolves to variable declaration '{0}' that compiler uses to support async functions.": {
1629
+
"category": "Error",
1630
+
"code": 2521
1631
+
},
1632
+
"The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression.": {
1633
+
"category": "Error",
1634
+
"code": 2522
1635
+
},
1636
+
"'yield' expressions cannot be used in a parameter initializer.": {
1637
+
"category": "Error",
1638
+
"code": 2523
1639
+
},
1640
+
"'await' expressions cannot be used in a parameter initializer.": {
1641
+
"category": "Error",
1642
+
"code": 2524
1643
+
},
1562
1644
"JSX element attributes type '{0}' must be an object type.": {
1563
1645
"category": "Error",
1564
1646
"code": 2600
@@ -2184,6 +2266,14 @@
2184
2266
"category": "Message",
2185
2267
"code": 6066
2186
2268
},
2269
+
"Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower.": {
2270
+
"category": "Message",
2271
+
"code": 6067
2272
+
},
2273
+
"Enables experimental support for ES7 async functions.": {
0 commit comments