Skip to content

Conversation

@a-tarasyuk
Copy link
Contributor

Fixes #39022

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Oct 18, 2020
Copy link
Contributor

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

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

It would be better to always parenthesize. I am also considering whether it would be feasible to introduce our auto-parenthesization from the node factory into the substitution performed by the printer.

Copy link
Contributor

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

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

The places where parens are unnnecessary is unavoidable at the moment. I'm investigating a change to the emitter that handles substitution as part of a transformation before printing which would remove the need for this fix, but unfortunately the change I'm investigating is not likely to be ready for 4.2.

Thanks for the effort on this!

@rbuckton rbuckton merged commit 4c118ae into microsoft:master Feb 4, 2021
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

If exported variable is renamed, tsc will generate code with a syntax error

3 participants