mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
884 B
Diff
16 lines
884 B
Diff
--- old.awaitInNonAsyncFunction.errors.txt
|
|
+++ new.awaitInNonAsyncFunction.errors.txt
|
|
@@= skipped -42, +42 lines =@@
|
|
for await (const _ of []);
|
|
~~~~~
|
|
!!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules.
|
|
-!!! related TS1356 awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'?
|
|
+!!! related TS1356 awaitInNonAsyncFunction.ts:13:7: Did you mean to mark this function as 'async'?
|
|
await p;
|
|
~~~~~
|
|
!!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
|
|
-!!! related TS1356 awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'?
|
|
+!!! related TS1356 awaitInNonAsyncFunction.ts:13:7: Did you mean to mark this function as 'async'?
|
|
}
|
|
|
|
const arrowFunc = (p: Promise<number>) => {
|