Viewing File: /home/ubuntu/misabloom-frontend-base/node_modules/zustand/ts3.4/middleware/redux.d.ts

import { StateCreator, StoreMutatorIdentifier } from '../vanilla';
declare type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
declare type Action = {
    type: unknown;
};
declare type StoreRedux<A> = {
    dispatch: (a: A) => A;
    dispatchFromDevtools: true;
};
declare type ReduxState<A> = {
    dispatch: StoreRedux<A>['dispatch'];
};
declare type WithRedux<S, A> = Write<S, StoreRedux<A>>;
declare type Redux = <T, A extends Action, Cms extends [
    StoreMutatorIdentifier,
    unknown
][] = [
]>(reducer: (state: T, action: A) => T, initialState: T) => StateCreator<Write<T, ReduxState<A>>, Cms, [
    [
        'zustand/redux',
        A
    ]
]>;
declare module '../vanilla' {
    interface StoreMutators<S, A> {
        'zustand/redux': WithRedux<S, A>;
    }
}
export declare const redux: Redux;
export {};
Back to Directory File Manager