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

chore: skip generating $.proxy() calls for more expressions #9979

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

jeremy-deutsch
Copy link
Contributor

Resolves #9966.

This PR adds unary and binary expressions to the list of cases where expressions being assigned to state don't get wrapped in $.proxy() in the generated output.

Unary and binary expressions (e.g. +x, !x, x + y, x in y) can never produce object values, so it doesn't make sense to wrap them in $.proxy().

Copy link

changeset-bot bot commented Dec 21, 2023

🦋 Changeset detected

Latest commit: b871f95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 21, 2023

@jeremy-deutsch is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@trueadm
Copy link
Contributor

trueadm commented Dec 27, 2023

@jeremy-deutsch Please could you add a changeset for this PR? Thanks :)

@jeremy-deutsch
Copy link
Contributor Author

@jeremy-deutsch Please could you add a changeset for this PR? Thanks :)

Sure thing!

@trueadm trueadm merged commit 346041f into sveltejs:main Jan 2, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte 5: unnecessary $.proxy() generated for += assignment
2 participants