Currently, I am working on a project that utilizes Vuex and the Composition API. With typescript enabled, I have a component in which I need to retrieve a boolean value from a getter in my store module using the following code:
const flag = computed(() => store.getters['test/flag'])
While this code functions properly during development, I encounter TypeScript errors when attempting to build it:
106:33 error Unsafe member access ['test/flag'] on an any value @typescript-eslint/no-unsafe-member-access 106:33 error Unsafe return of an any typed value
@typescript-eslint/no-unsafe-return
Can someone guide me on how to configure the store to work with getters in TypeScript?