greenpress / vuex-composition-helpers

A util package to use Vuex with Composition API easily.
https://www.npmjs.com/package/vuex-composition-helpers
MIT License
288 stars 32 forks source link

[Next branch] Fix compatibility with TypeScript 4.7.x #69

Closed LeSuisse closed 2 years ago

LeSuisse commented 2 years ago

This change is similar to #68 but it targets the next branch.

TypeScript 4.7.x complains about the possible implicit conversion from symbol to string. 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:

 FAIL  tests/global-state.test.ts
  ● Test suite failed to run
    src/util.ts:49:48 - error TS2731: Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.
    49   return cb(store, namespace ? `${namespace}/${prop}` : prop);
davidmeirlevy commented 2 years ago

Duplicate. Let's discuss on #68.