diff --git a/tests/middlewareTypes.test.tsx b/tests/middlewareTypes.test.tsx index e87c5f62ab..d38fa40e6e 100644 --- a/tests/middlewareTypes.test.tsx +++ b/tests/middlewareTypes.test.tsx @@ -96,6 +96,13 @@ describe('counter state spec (single middleware)', () => { inc: () => set((state) => { state.count = get().count + 1 + type OmitFn = Exclude any> + expectTypeOf< + OmitFn[0]> + >().not.toMatchTypeOf<{ additional: number }>() + expectTypeOf>().toMatchTypeOf<{ + additional: number + }>() }), })), ),