TypeScript/tests/cases/fourslash/codeFixAddMissingAwait_propertyAccess2.ts
Andrew Branch 571ca60b08
Add preceding semicolon on await insertion when parentheses are included (#34627)
* Add preceding semicolon on await insertion when parentheses are included

* Just start with precedingToken

* Fix semicolon formatter regression

* Delete test with debatable expected behavior

* Lint after control flow changes
2019-11-19 13:11:42 -08:00

16 lines
312 B
TypeScript

/// <reference path="fourslash.ts" />
////async function fn(a: Promise<{ x: string }>) {
//// console.log(3)
//// a.x;
////}
verify.codeFix({
description: ts.Diagnostics.Add_await.message,
index: 0,
newFileContent:
`async function fn(a: Promise<{ x: string }>) {
console.log(3)
;(await a).x;
}`
});