Parentheses missing with await
and typescript
parser
#16288
Labels
lang:typescript
Issues affecting TypeScript-specific constructs (not general JS issues)
scope:external
This is not an issue with Prettier, it’s an issue with external software, like an editor integration
type:bug
Issues identifying ugly output, or a defect in the program
Prettier 3.2.5
Playground link
Input:
Output:
Expected output:
Why?
The parentheses are necessary to
await
the.json()
response.For comparison, it works fine with the
babel
parser. (Is thetypescript
parser deprecated? I don't think so.)I found a very old similar bug. Also an active area of discussion.
The text was updated successfully, but these errors were encountered: