Skip to content

Reduce aggression of parenthesis removal in ts transform #24073

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

Merged
merged 1 commit into from
May 14, 2018

Conversation

weswigham
Copy link
Member

Fixes #24021

Since comments are the only way we introduce a line terminator (as we do not preserve input whitespace in general), simply checking for the presence of a leading comment is sufficient for checking if we need to preserve the parens when removing the parens around a cast or not.

@weswigham weswigham merged commit b58e4e1 into microsoft:master May 14, 2018
@weswigham weswigham deleted the asi-parens branch May 14, 2018 18:20
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants