You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to define a custom getter / setter on a state object via Object.defineProperty, svelte compiler throws the following error:
state_descriptors_fixed Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
The only way to make it work which defeats the purpose of a custom getter / setter is to remove the getter and setter and provide the value option to the Object.defineProperty:
Describe the bug
When trying to define a custom getter / setter on a state object via
Object.defineProperty
, svelte compiler throws the following error:state_descriptors_fixed Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
E.g.
The only way to make it work which defeats the purpose of a custom getter / setter is to remove the getter and setter and provide the
value
option to theObject.defineProperty
:Reproduction
Playground
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: