diff --git a/src/store/storageHelper.ts b/src/store/storageHelper.ts index d3a4fee..767cf3c 100644 --- a/src/store/storageHelper.ts +++ b/src/store/storageHelper.ts @@ -34,10 +34,10 @@ export const loadStore = () => { } } -function serialize(data: string) { - return JSON.stringify(btoa(encodeURIComponent(data))) +function serialize(data: object): string { + return btoa(encodeURIComponent(JSON.stringify(data))) } -function deserialize(b64: string) { +function deserialize(b64: string): string { return JSON.parse(decodeURIComponent(atob(b64))) }