Skip to content
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

Nuxt 2 TS error #65

Open
avxkim opened this issue Jun 20, 2023 · 0 comments
Open

Nuxt 2 TS error #65

avxkim opened this issue Jun 20, 2023 · 0 comments

Comments

@avxkim
Copy link

avxkim commented Jun 20, 2023

I'm using Vue 2.7 + Nuxt 2.16 + @nuxtjs/composition API

export const useDictionaryStore = defineStore(
  'dictionary',
  () => {
    // ...code removed

    return {
       someData,
    }
  },
  {
    persist: {
      enabled: true,
      strategies: [
        {
          storage: localStorage,
        },
      ],
    },
  }
)

Getting TS error: Argument of type '{ persist: { enabled: boolean; strategies: { storage: Storage; }[]; }; }' is not assignable to parameter of type 'DefineSetupStoreOptions<"dictionary", _UnwrapAll

Even though i've added types in tsconfig.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant