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
tests/cases/compiler/awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
13
13
tests/cases/compiler/awaitInNonAsyncFunction.ts(34,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules.
14
14
tests/cases/compiler/awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
15
-
tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
16
-
tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
15
+
tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: The 'module' setting 'ES2015' does not support top-level 'for await' loops. Consider switching to 'ES2022'.
16
+
tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: The 'module' setting 'ES2015' does not support top-level 'await' expressions. Consider switching to 'ES2022'.
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
100
+
!!! error TS1432: The 'module' setting 'ES2015' does not support top-level 'for await' loops. Consider switching to 'ES2022'.
101
101
await null;
102
102
~~~~~
103
-
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
103
+
!!! error TS1378: The 'module' setting 'ES2015' does not support top-level 'await' expressions. Consider switching to 'ES2022'.
0 commit comments