TypeScript/tests/cases/fourslash/codeFixAwaitInSyncFunction11.ts

16 lines
366 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({
index: 0,
description: "Add async modifier to containing function",
newFileContent:
`const f: string = async () => {
await Promise.resolve('foo');
}`
});