Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix closing parens on multi-line intersection/union type #3436

Merged
merged 1 commit into from Dec 10, 2017

Conversation

existentialism
Copy link
Collaborator

Fixes #3403.

@@ -2324,6 +2325,27 @@ function genericPrintNoParens(path, options, print, args) {
join(concat([line, "| "]), printed)
]);

let hasParens;

if (n.type === "TSUnionType") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really happy with this, but it seemed better to keep this logic here than spread it into TSParenthesizedType?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels about the same either way to me personally

@azz azz merged commit 38c8286 into prettier:master Dec 10, 2017
@duailibe duailibe added this to the 1.9.2 milestone Dec 10, 2017
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
@existentialism existentialism deleted the issue3403 branch February 15, 2019 22:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants