robinvdvleuten / vuex-persistedstate

💾 Persist and rehydrate your Vuex state between page reloads.
https://npm.im/vuex-persistedstate
MIT License
5.77k stars 379 forks source link

'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. #286

Closed avxkim closed 4 years ago

avxkim commented 4 years ago

version: "vuex-persistedstate": "^3.0.1"

From a README:

const dataState = new createPersistedState({
  paths: ['data']
})

but this causes an error in TS: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.ts(7009)

image

robinvdvleuten commented 4 years ago

This is an error in the README; you can create a plugin instance through createPersistedState().

avxkim commented 4 years ago

@robinvdvleuten would you fix it, so others won't face this issue?

robinvdvleuten commented 4 years ago

@webcoderkz it is already fixed in the README 👍