Skip to content

Await insert break ASI #33522

@Kingwl

Description

@Kingwl

TypeScript Version: 3.4.0-dev.201xxxxx

Search Terms:

Code

async function foo () {
  const a: Promise<any> = f()
  a./*here*/
}

Expected behavior:

;(await a).xxx

Actual behavior:

async function foo () {
  const a: Promise<any> = f()
  (await a).xxx // asi broken here
}

Playground Link:

https://twitter.com/Luxcium/status/1174602967053471744

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions