-
Notifications
You must be signed in to change notification settings - Fork 12.8k
fix(44639): Transpilation of optional chaining combined with type casting results in function call losing its context #44666
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
Conversation
I should be able to merge this shortly. @weswigham: Can you take a quick look at the changes in d7d0434 since this changes something you fixed a few years ago? |
@DanielRosenwasser, @andrewbranch: Should we take this for 4.5? If so, I can cherry pick once this is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, though I'd like to get a review from someone else on the TS team for my changes in emitter.ts and ts.ts around ASI and comment handling.
I think this should target 4.6 at this point. |
…ting results in function call losing its context (microsoft#44666) * fix(44639): Fix emit for optional chain with type assertions * Move ASI-blocking parens out of ts transform * Add missing comments from PartiallyEmittedExpression+minor cleanup * Avoid comment duplication on copied receiver Co-authored-by: Ron Buckton <[email protected]>
Fixes #44639