TypeScript/tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts

18 lines
349 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
////function f() {
//// for await (const x of g()) {
//// console.log(x);
//// }
////}
verify.codeFix({
description: "Add async modifier to containing function",
newFileContent:
`async function f() {
for await (const x of g()) {
console.log(x);
}
}`,
});