TypeScript/tests/cases/fourslash/codeFixAwaitInSyncFunction11.ts
Ron Buckton eb3645f16b
Refactor node factory API, use node factory in parser (#35282)
* Refactor node factory API, use node factory in parser

* Move UnparsedSource nodes to factory

* Make most Node properties read-only

* Make pos/end/parent and JSDoc 'comment' read-only

* Update function/constructor-type factories

* Remove treeStateObserver

* Simplify Debug.deprecate

* Remove unused factory methods, simplify lazy factory methods

* Fix base factory used for source file updates

* Update test baseline due to merge from master

* Rename factory methods to be more consistent (#39058)
2020-06-16 16:55:03 -07:00

16 lines
366 B
TypeScript

/// <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');
}`
});