Skip to content

Commit

Permalink
Fix typings for store enhancer
Browse files Browse the repository at this point in the history
  • Loading branch information
zewish committed Nov 16, 2023
1 parent efe2dd9 commit 991ceeb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const rememberReducer = <S = any, A extends Action = AnyAction>(
};
};

const rememberEnhancer = (
const rememberEnhancer = <Ext = {}, StateExt = {}>(
driver: Driver,
rememberedKeys: string[],
{
Expand All @@ -71,7 +71,7 @@ const rememberEnhancer = (
persistDebounce,
persistWholeStore = false
}: Partial<Options> = {}
): any => {
): StoreEnhancer<Ext, StateExt> => {
if (!driver) {
throw Error('redux-remember error: driver required');
}
Expand All @@ -80,10 +80,10 @@ const rememberEnhancer = (
throw Error('redux-remember error: rememberedKeys needs to be an array');
}

const storeCreator = (createStore: StoreCreator) => (
rootReducer: Reducer<any>,
const storeCreator = (createStore: StoreCreator): StoreCreator => (
rootReducer: Reducer,
initialState?: PreloadedState<any>,
enhancer?: StoreEnhancer<any>
enhancer?: StoreEnhancer
): Store => {
const store = createStore(
rootReducer,
Expand Down

0 comments on commit 991ceeb

Please sign in to comment.