-
-
Notifications
You must be signed in to change notification settings - Fork 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
Typing breaks when using non-string 'id' state property #253
Comments
This is an interesting one. It makes me realize maybe all properties of the store should be prefixed with |
Very fast response, thanks. I agree that prefixing sounds like a good idea. Maybe also prefixing _r private property to maintain consistency? |
it's already prefixed with |
Close #253. This also aligns with the current v2 API and makes migration easier from Vue 2 to Vue 3. BREAKING CHANGES: all store properties (`id`, `state`, `patch`, `subscribe`, and `reset`) are now prefixed with `$` to allow properties defined with the same type and avoid types breaking. Tip: you can refactor your whole codebase with F2 (or right-click + Rename) on each of the store's properties
Reproduction
Steps to reproduce the behavior
Expected behavior
I should be able to define any properties with any types in the state.
Additional information
Most likely it's a collision with 'id' property on store itself which is typed as string. It works as expected in getters just actions are broken.
The text was updated successfully, but these errors were encountered: