-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Bug with type annotation, keep removing and adding parentheses #5789
Copy link
Copy link
Labels
area:idempotencyIssues with re-printing Prettier’s outputIssues with re-printing Prettier’s outputlang: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.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!Issues with an accompanying pull request. These issues will probably be fixed soon!
Milestone
Metadata
Metadata
Assignees
Labels
area:idempotencyIssues with re-printing Prettier’s outputIssues with re-printing Prettier’s outputlang: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.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!Issues with an accompanying pull request. These issues will probably be fixed soon!
Following #5247
I think, introduced in 30979ed
Prettier 1.16.0
Playground link
Input:
Output:
Expected behavior:
A choice between
(): () => void => (): void => null;and(): (() => void) => (): void => null;.I think the second one is better.