-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
breaking: apply fallback value every time in runes mode #10797
Conversation
🦋 Changeset detectedLatest commit: 6973746 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
same. I also lean strongly towards 'nuke |
Yup, I agree with all of the above - apply the default value, and nuke accessors ASAP. I think it's acceptable to have a getter return a different value from the one you just called the setter with. |
4bb30db
to
43e97b8
Compare
closes #9948
Draft mode becauseI came across an interesting question with regards to accessors and default values. Right now, setting a component property toundefined
through its accessor (component.property = undefined
) will set it to actuallyundefined
instead of the default value. One could argue this is correct since implementation-wise this isn't looking for what's coming in from the property, instead it's updating the internal state with a new value. Semantically one could argue it should apply the fallback value (change should be straightforward, change the setter fromset x($$value) {..}
toset x($$value = fallback) {..}
) since it's setting the property, just through another path. Semantically one could also argue that setting it through the accessor is more direct than through a property, and so it shouldn't apply.We need to make a decision here. I slightly lean towards "applies default value".
Update: decided
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint