TypeScript/tests/cases/fourslash/codeFixAwaitInSyncFunction13.ts

14 lines
349 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
////const f: () => Promise<number | string> = () => {
//// await Promise.resolve('foo');
////}
verify.codeFix({
description: "Add async modifier to containing function",
newFileContent:
`const f: () => Promise<number | string> = async () => {
await Promise.resolve('foo');
}`,
});