import type { Action as ReduxAction, UnknownAction, Dispatch as ReduxDispatch, Middleware } from 'redux'; import type { TSHelpersExtractDispatchExtensions } from '@reduxjs/toolkit'; import type { ReactReduxContextValue } from 'react-redux'; import type { Context } from 'react'; import type { DynamicMiddlewareInstance, GetDispatch, GetState, MiddlewareApiConfig } from '@reduxjs/toolkit'; export type UseDispatchWithMiddlewareHook[] = [], State = any, Dispatch extends ReduxDispatch = ReduxDispatch> = () => TSHelpersExtractDispatchExtensions & Dispatch; export type CreateDispatchWithMiddlewareHook = ReduxDispatch> = { , ...Middleware[] ]>(...middlewares: Middlewares): UseDispatchWithMiddlewareHook; withTypes(): CreateDispatchWithMiddlewareHook, GetDispatch>; }; type ActionFromDispatch> = Dispatch extends ReduxDispatch ? Action : never; interface ReactDynamicMiddlewareInstance = ReduxDispatch> extends DynamicMiddlewareInstance { createDispatchWithMiddlewareHookFactory: (context?: Context> | null>) => CreateDispatchWithMiddlewareHook; createDispatchWithMiddlewareHook: CreateDispatchWithMiddlewareHook; } export declare const createDynamicMiddleware: = ReduxDispatch>() => ReactDynamicMiddlewareInstance; export {};