TypeScript/tests/cases/fourslash/codeFixAwaitInSyncFunction_all.ts

27 lines
510 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
////function f() {
//// await Promise.resolve();
2019-09-13 20:22:59 +02:00
//// await Promise.resolve();
////}
////
////const g = () => {
//// await f();
2019-09-13 20:22:59 +02:00
//// await f();
////}
verify.codeFixAll({
fixId: "fixAwaitInSyncFunction",
fixAllDescription: "Add all missing 'async' modifiers",
newFileContent:
`async function f() {
await Promise.resolve();
2019-09-13 20:22:59 +02:00
await Promise.resolve();
}
const g = async () => {
await f();
2019-09-13 20:22:59 +02:00
await f();
}`,
});