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."},
@@ -382,6 +397,11 @@ namespace ts {
382
397
No_base_constructor_has_the_specified_number_of_type_arguments: {code: 2508,category: DiagnosticCategory.Error,key: "No base constructor has the specified number of type arguments."},
383
398
Base_constructor_return_type_0_is_not_a_class_or_interface_type: {code: 2509,category: DiagnosticCategory.Error,key: "Base constructor return type '{0}' is not a class or interface type."},
384
399
Base_constructors_must_all_have_the_same_return_type: {code: 2510,category: DiagnosticCategory.Error,key: "Base constructors must all have the same return type."},
400
+
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."},
401
+
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."},
402
+
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."},
403
+
yield_expressions_cannot_be_used_in_a_parameter_initializer: {code: 2523,category: DiagnosticCategory.Error,key: "'yield' expressions cannot be used in a parameter initializer."},
404
+
await_expressions_cannot_be_used_in_a_parameter_initializer: {code: 2524,category: DiagnosticCategory.Error,key: "'await' expressions cannot be used in a parameter initializer."},
385
405
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."},
386
406
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."},
387
407
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."},
@@ -538,6 +558,8 @@ namespace ts {
538
558
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."},
539
559
Enables_experimental_support_for_ES7_decorators: {code: 6065,category: DiagnosticCategory.Message,key: "Enables experimental support for ES7 decorators."},
540
560
Enables_experimental_support_for_emitting_type_metadata_for_decorators: {code: 6066,category: DiagnosticCategory.Message,key: "Enables experimental support for emitting type metadata for decorators."},
561
+
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."},
562
+
Enables_experimental_support_for_ES7_async_functions: {code: 6068,category: DiagnosticCategory.Message,key: "Enables experimental support for ES7 async functions."},
541
563
Variable_0_implicitly_has_an_1_type: {code: 7005,category: DiagnosticCategory.Error,key: "Variable '{0}' implicitly has an '{1}' type."},
542
564
Parameter_0_implicitly_has_an_1_type: {code: 7006,category: DiagnosticCategory.Error,key: "Parameter '{0}' implicitly has an '{1}' type."},
543
565
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,7 +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
+
706
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
+
},
707
768
708
769
"The return type of a property decorator function must be either 'void' or 'any'.": {
709
770
"category": "Error",
@@ -1519,6 +1580,27 @@
1519
1580
"code": 2510
1520
1581
},
1521
1582
1583
+
"Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": {
1584
+
"category": "Error",
1585
+
"code": 2520
1586
+
},
1587
+
"Expression resolves to variable declaration '{0}' that compiler uses to support async functions.": {
1588
+
"category": "Error",
1589
+
"code": 2521
1590
+
},
1591
+
"The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression.": {
1592
+
"category": "Error",
1593
+
"code": 2522
1594
+
},
1595
+
"'yield' expressions cannot be used in a parameter initializer.": {
1596
+
"category": "Error",
1597
+
"code": 2523
1598
+
},
1599
+
"'await' expressions cannot be used in a parameter initializer.": {
1600
+
"category": "Error",
1601
+
"code": 2524
1602
+
},
1603
+
1522
1604
"JSX element attributes type '{0}' must be an object type.": {
1523
1605
"category": "Error",
1524
1606
"code": 2600
@@ -2145,6 +2227,14 @@
2145
2227
"category": "Message",
2146
2228
"code": 6066
2147
2229
},
2230
+
"Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower.": {
2231
+
"category": "Message",
2232
+
"code": 6067
2233
+
},
2234
+
"Enables experimental support for ES7 async functions.": {
0 commit comments