c0bdd12c4c
* add fixAwaitInSyncFunction code fix * Just insert the keyword * only one codefix * remove comment * Change explicit return type T to Promise<T> * Review changes * Change codefix message
17 lines
349 B
TypeScript
17 lines
349 B
TypeScript
/// <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);
|
|
}
|
|
}`,
|
|
});
|