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/diagnosticMessages.json
+19-3
Original file line number
Diff line number
Diff line change
@@ -863,7 +863,7 @@
863
863
"category": "Error",
864
864
"code": 1300
865
865
},
866
-
"'await' expression is only allowed within an async function.": {
866
+
"'await' expressions are only allowed within async functions and at the top levels of modules.": {
867
867
"category": "Error",
868
868
"code": 1308
869
869
},
@@ -1085,7 +1085,7 @@
1085
1085
},
1086
1086
"Split all invalid type-only imports": {
1087
1087
"category": "Message",
1088
-
"code": 1377
1088
+
"code": 1367
1089
1089
},
1090
1090
"Specify emit/checking behavior for imports that are only used for types": {
1091
1091
"category": "Message",
@@ -1115,10 +1115,14 @@
1115
1115
"category": "Message",
1116
1116
"code": 1374
1117
1117
},
1118
-
"'await' outside of an async function is only allowed at the top level of a module when '--module' is 'esnext' or 'system' and '--target' is 'es2017' or higher.": {
1118
+
"'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.": {
1119
1119
"category": "Error",
1120
1120
"code": 1375
1121
1121
},
1122
+
"Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.": {
1123
+
"category": "Error",
1124
+
"code": 1376
1125
+
},
1122
1126
"The types of '{0}' are incompatible between these types.": {
1123
1127
"category": "Error",
1124
1128
"code": 2200
@@ -5416,6 +5420,18 @@
5416
5420
"category": "Message",
5417
5421
"code": 95096
5418
5422
},
5423
+
"Add 'export {}' to make this file into a module": {
5424
+
"category": "Message",
5425
+
"code": 95097
5426
+
},
5427
+
"Set the 'target' option in your configuration file to '{0}'": {
5428
+
"category": "Message",
5429
+
"code": 95098
5430
+
},
5431
+
"Set the 'module' option in your configuration file to '{0}'": {
5432
+
"category": "Message",
5433
+
"code": 95099
5434
+
},
5419
5435
5420
5436
"No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": {
0 commit comments