Closed LeSuisse closed 2 years ago
Hi @LeSuisse !
Thanks for this contribution!! Would you mind just please to add a simple unit test, to check store usage using symbols?
It will make this improvement more resilient for future use cases.
Thanks!
Would you mind just please to add a simple unit test, to check store usage using symbols?
Thanks for asking me to do that because I realized that making it work at runtime did not make a lot of sense. Symbols cannot be used for that since they cannot be serialized (https://github.com/vuejs/vuex/issues/303). I updated the type to exclude any symbol from the known keys.
Also, sorry for the noise in #69 I was not sure how you handle backports to the next
branch.
Thanks!
The "next" branch is almost completely different than the master branch, and needs a separate PR.
TypeScript 4.7.x complains about the possible implicit conversion from
symbol
tostring
. Doing the conversion explicitly fixes the issues.To reproduce the issue, you can upgrade the TypeScript version set as a dev dependency and then run the test suite. You will see error like this without this contribution: