From 8a1f90086b78c257cfe0b59a58817c54ea2da29d Mon Sep 17 00:00:00 2001 From: Afzal Ansari Date: Sat, 17 Dec 2022 13:27:40 +0545 Subject: [PATCH] types: add mising dispatch in reduce --- src/__tests__/persist-test.tsx | 2 +- src/utils/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/persist-test.tsx b/src/__tests__/persist-test.tsx index f62c9f6..87def82 100644 --- a/src/__tests__/persist-test.tsx +++ b/src/__tests__/persist-test.tsx @@ -231,7 +231,7 @@ describe('Reduce tests', () => { } }) - function reducer(state: State, action: Action) { + function reducer(state: Omit, action: Action) { switch (action.type) { case 'inc': return { diff --git a/src/utils/types.ts b/src/utils/types.ts index 4d6edb1..af7747e 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -24,7 +24,7 @@ export type ReduceHook = (() => State< TState & { dispatch: (_: TState, action: Action) => void } >) & { subscribe: (cb: () => void | any) => () => boolean - state: State + state: State void }> } export type AssignInternal = T extends undefined