import { CreateSliceOptions } from '@reduxjs/toolkit'; declare type MiddlewareComponents = { middleware: Function; initialStateUpdate: Function; }; export declare type MiddlewaresArgs = ((...arg: any[]) => MiddlewareComponents); /** * This function is used to update the initialState and the reducers of the store with the middlewares. * @param {object} sliceConfig - The sliceConfig represent the configuration of the slice that will be created in the store * @param {function[]} middlewares - The array of middlewares that will be executed by the reducer and add the extra functionality to the reducer * @returns {object} - The object what represent the reducers composed of all middlewares * @author: Juan David Avila Caycedo [JuanDAC] (https://github.com/JuanDAC) */ export declare const sliceMiddleware: (sliceConfig: CreateSliceOptions, middlewares: MiddlewaresArgs[]) => CreateSliceOptions; /** * --------------------------------------------------------------------------------------------------------------------- * MIDDLEWARES FOR SLICE * --------------------------------------------------------------------------------------------------------------------- */ /** * This middleware is used to add the property sliceMiddleware to the state of the slice * @param {string} name * @param {object} initialState * @param {string} appName * @author: Juan David Avila Caycedo [JuanDAC] (https://github.com/JuanDAC) * @returns The new state of the slice with the property sliceMiddleware added to the state object of the slice */ /** */ export declare const middlewareLocalStorage: ({ name, initialState }: CreateSliceOptions) => { middleware: (_: undefined, reducer: (...args: any[]) => void) => (...args: any[]) => void; initialStateUpdate: (initialState: any) => any; }; export {};