You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch redux-persist@6.0.0 for the project I'm working on.
Added stricter type checking for the blacklist and whitelist keys in redux-persist config. According to my understanding, this stricter type checking prevents entering invalid keys/strings as blacklist and whitelist, and also provides autocomplete when adding keys. Interested in hearing any thoughts that disagree, or reasons why this might not be a good change to make!
diff --git a/node_modules/redux-persist/types/types.d.ts b/node_modules/redux-persist/types/types.d.ts
index b3733bc..ac7517d 100644
--- a/node_modules/redux-persist/types/types.d.ts+++ b/node_modules/redux-persist/types/types.d.ts@@ -31,8 +31,8 @@ declare module "redux-persist/es/types" {
* @deprecated keyPrefix is going to be removed in v6.
*/
keyPrefix?: string;
- blacklist?: Array<string>;- whitelist?: Array<string>;+ blacklist?: Array<keyof S>;+ whitelist?: Array<keyof S>;
transforms?: Array<Transform<HSS, ESS, S, RS>>;
throttle?: number;
migrate?: PersistMigrate;
The text was updated successfully, but these errors were encountered:
subrapak
changed the title
[Typescript] Stricter type checking for persist config
[Typescript suggestion] Stricter type checking for persist config
Jul 26, 2022
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.Added stricter type checking for the blacklist and whitelist keys in redux-persist config. According to my understanding, this stricter type checking prevents entering invalid keys/strings as blacklist and whitelist, and also provides autocomplete when adding keys. Interested in hearing any thoughts that disagree, or reasons why this might not be a good change to make!
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: