@umituz/react-native-storage 2.6.10 → 2.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-storage",
3
- "version": "2.6.10",
3
+ "version": "2.6.11",
4
4
  "description": "Unified storage solution with AsyncStorage persistence, Zustand state management, and in-memory caching for React Native",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -39,8 +39,8 @@ export function createStore<
39
39
  version: config.version || 1,
40
40
  partialize: config.partialize
41
41
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
- ? (state) => config.partialize!(state as any) as any
43
- : (state) => {
42
+ ? (state: Store) => config.partialize!(state as any) as any
43
+ : (state: Store) => {
44
44
  const persisted: Record<string, unknown> = {};
45
45
  for (const key of Object.keys(state)) {
46
46
  if (typeof state[key as keyof Store] !== 'function') {
@@ -50,7 +50,7 @@ export function createStore<
50
50
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
51
51
  return persisted as any;
52
52
  },
53
- onRehydrateStorage: () => (state) => {
53
+ onRehydrateStorage: () => (state: Store | undefined) => {
54
54
  if (state && config.onRehydrate) {
55
55
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
56
  config.onRehydrate(state as any);