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

Incrementing/decrementing BigInt $states throws an error #14484

Closed
Ocean-OS opened this issue Dec 1, 2024 · 0 comments · Fixed by #14485
Closed

Incrementing/decrementing BigInt $states throws an error #14484

Ocean-OS opened this issue Dec 1, 2024 · 0 comments · Fixed by #14485

Comments

@Ocean-OS
Copy link
Contributor

Ocean-OS commented Dec 1, 2024

Describe the bug

When compiling foo++ and bar-- statements (assuming that foo and bar are $states), Svelte assumes that foo and bar are numbers, and compiles it to $.update(foo) and $.update(bar, -1). However, if foo or bar are BigInts, this causes an error because numbers and BigInts cannot be mixed together without type conversion.
I have a PR ready for this.

Reproduction

REPL

Logs

No response

System Info

N/A

Severity

annoyance

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 a pull request may close this issue.

1 participant