rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.94k stars 866 forks source link

Missing config parameter #1319

Open Ilann0 opened 3 years ago

Ilann0 commented 3 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch redux-persist@6.0.0 for the project I'm working on.

I noticed that deserialize was not typed out into the declaration file.

Here is the diff that solved my problem:

diff --git a/node_modules/redux-persist/dist/redux-persist.js b/node_modules/redux-persist/dist/redux-persist.js
index 6168f26..743972b 100644
--- a/node_modules/redux-persist/dist/redux-persist.js
+++ b/node_modules/redux-persist/dist/redux-persist.js
@@ -125,7 +125,7 @@ function _nonIterableSpread() {

 var KEY_PREFIX = 'persist:';
 var FLUSH = 'persist/FLUSH';
-var REHYDRATE = 'persist/REHYDRATE';
+var REHYDRATE = '';
 var PAUSE = 'persist/PAUSE';
 var PERSIST = 'persist/PERSIST';
 var PURGE = 'persist/PURGE';
diff --git a/node_modules/redux-persist/types/types.d.ts b/node_modules/redux-persist/types/types.d.ts
index b3733bc..2772f57 100644
--- a/node_modules/redux-persist/types/types.d.ts
+++ b/node_modules/redux-persist/types/types.d.ts
@@ -43,6 +43,7 @@ declare module "redux-persist/es/types" {
     getStoredState?: (config: PersistConfig<S, RS, HSS, ESS>) => Promise<PersistedState>;
     debug?: boolean;
     serialize?: boolean;
+    deserialize?: boolean;
     timeout?: number;
     writeFailHandler?: (err: Error) => void;
   }

This issue body was partially generated by patch-package.