-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Parentheses missing with await and typescript parser #16288
Copy link
Copy link
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.scope:externalThis is not an issue with Prettier, it’s an issue with external software, like an editor integrationThis is not an issue with Prettier, it’s an issue with external software, like an editor integration
Metadata
Metadata
Assignees
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.scope:externalThis is not an issue with Prettier, it’s an issue with external software, like an editor integrationThis is not an issue with Prettier, it’s an issue with external software, like an editor integration
Prettier 3.2.5
Playground link
Input:
Output:
Expected output:
Why?
The parentheses are necessary to
awaitthe.json()response.For comparison, it works fine with the
babelparser. (Is thetypescriptparser deprecated? I don't think so.)I found a very old similar bug. Also an active area of discussion.