@umituz/react-native-storage 2.6.9 → 2.6.10

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.9",
3
+ "version": "2.6.10",
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",
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { create } from 'zustand';
7
7
  import { persist, createJSONStorage } from 'zustand/middleware';
8
+ import type { StoreApi } from 'zustand';
8
9
  import type { StoreConfig } from '../types/Store';
9
10
  import { storageService } from '../../infrastructure/adapters/StorageService';
10
11
 
@@ -16,9 +17,10 @@ export function createStore<
16
17
  TActions extends object = object
17
18
  >(config: StoreConfig<TState, TActions>) {
18
19
  type Store = TState & TActions;
20
+ type SetState = StoreApi<Store>['setState'];
21
+ type GetState = StoreApi<Store>['getState'];
19
22
 
20
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
- const stateCreator = (set: any, get: any): Store => {
23
+ const stateCreator = (set: SetState, get: GetState): Store => {
22
24
  const state = config.initialState as TState;
23
25
  const actions = config.actions
24
26
  ? config.actions(set, get)