-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
What problem is this solving
At the moment, when attempting to use a writable computed (computed({ get () { … }, set (value) { … } })) with mapWritableState, TS reports an error. I assume that this is because mapWritableState, unlike mapState, only allows state and not computeds.
Despite TypeScript complaining, it seems like it does work as expected at runtime (but I did not test extensively).
Proposed solution
Allow computeds that are writable (WritableComputedRef) to be used within mapWritableState.
Describe alternatives you've considered
No response