TypeScript/tests/cases/fourslash/codeFixAwaitInSyncFunction11.ts

15 lines
352 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
////const f: string = () => {
//// await Promise.resolve('foo');
////}
// should not change type if it's incorrectly set
verify.codeFix({
description: "Add async modifier to containing function",
newFileContent:
`const f: string = async () => {
await Promise.resolve('foo');
}`,
});