UNPKG

neuro-store

Version:
20 lines (19 loc) 703 B
import { type Dispatch, type ReactNode } from "react"; import type { createStore } from "../utils/index"; type StoreContextType = { state: ReturnType<typeof createStore>; dispatch: Dispatch<any> & { withPromise: (action: any) => Promise<any>; }; }; export declare const StoreContext: import("react").Context<StoreContextType>; type GetState = () => any; export type MiddlewareType = (api: { dispatch: Dispatch<any>; getState: GetState; }) => (next: Dispatch<any>) => (action: any) => any; export declare const StoreProvider: ({ children, store }: { children: ReactNode; store: ReturnType<typeof createStore>; }) => import("react/jsx-runtime").JSX.Element; export {};