using encrypt-storage with pinia-plugin-persistedstate #641
Unanswered
smjdev-lab
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to use encrypt-storage in one of my personal projects. when using encrypt-storage(2.12.16) with pinia-plugin-persistedstate(3.1.0) as per README
storage: encryptStorage,
is failing the build with the following error message
Type 'EncryptStorage' is not assignable to type 'StorageLike'.
The types returned by 'getItem(...)' are incompatible between these types.
Type 'string | null | undefined' is not assignable to type 'string | null'.
Type 'undefined' is not assignable to type 'string | null'.ts(2322)
index.d.ts(30, 5): The expected type comes from property 'storage' which is declared here on type 'PersistedStateOptions'
(property) PersistedStateOptions.storage?: StorageLike | undefined
Has anyone else faced this issue ? Or am I doing things the wrong way ? Appreciate help / workaround in this matter.
Regards
Beta Was this translation helpful? Give feedback.
All reactions