Skip to content

More rigorous ASI prevention when emitting return/yield #60304

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 3 commits into from
Oct 22, 2024
Merged

Conversation

rbuckton
Copy link
Member

This performs a more in-depth check of an expression that could potentially introduce an ASI conflict after transformation by walking into the left-hand sides of CallExpression, TaggedTemplateExpression, BinaryExpression, ConditionalExpression, PostfixUnaryExpression, PropertyAccessExpression, and ElementAccessExpression. This also does the same for NonNullExpression, AsExpression, and SatisfiesExpression in the event someone is using the emitter to manually print a TS to TS transformation.

Fixes #59237
Fixes #60296

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 21, 2024
@rbuckton rbuckton changed the title More rigorous ASI prevention when emitting return More rigorous ASI prevention when emitting return/yield Oct 21, 2024
@rbuckton rbuckton merged commit 1679f44 into main Oct 22, 2024
32 checks passed
@rbuckton rbuckton deleted the fix59237 branch October 22, 2024 23:20
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
3 participants