mt-flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
40 lines (39 loc) • 2.38 kB
TypeScript
import type { ErrorSlice } from '@/store/error.slice';
import React from 'react';
import type { AppAdminSlice } from './app-admin.slice';
import type { AppSlice } from './app.slice';
import type { ConfigSlice } from './config.slice';
import type { DashInitState } from './dash.slice';
import type { DesignSlice } from './design.slice';
import type { ResListState } from './resview.slice';
export type AppStoreType = DesignSlice & AppAdminSlice & AppSlice & ConfigSlice & ErrorSlice;
export type ResAppInitStateType = ResListState & DashInitState;
export type ResAppType = ReturnType<typeof createResAppStore>;
export declare const createResAppStore: (initProps?: Partial<ResAppInitStateType>) => import("zustand").UseBoundStore<Omit<Omit<Omit<import("zustand").StoreApi<AppStoreType>, "setState"> & {
setState<A extends string | {
type: unknown;
}>(partial: AppStoreType | Partial<AppStoreType> | ((state: AppStoreType) => AppStoreType | Partial<AppStoreType>), replace?: boolean | undefined, action?: A | undefined): void;
}, "persist"> & {
persist: {
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<AppStoreType, AppStoreType>>) => void;
clearStorage: () => void;
rehydrate: () => void | Promise<void>;
hasHydrated: () => boolean;
onHydrate: (fn: (state: AppStoreType) => void) => () => void;
onFinishHydration: (fn: (state: AppStoreType) => void) => () => void;
getOptions: () => Partial<import("zustand/middleware").PersistOptions<AppStoreType, AppStoreType>>;
};
}, "subscribe"> & {
subscribe: {
(listener: (selectedState: AppStoreType, previousSelectedState: AppStoreType) => void): () => void;
<U>(selector: (state: AppStoreType) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
equalityFn?: ((a: U, b: U) => boolean) | undefined;
fireImmediately?: boolean | undefined;
} | undefined): () => void;
};
}>;
type ResAppProviderProps = React.PropsWithChildren<Partial<ResAppInitStateType>>;
export declare function AppProvider({ children, ...props }: ResAppProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useAppStore<T>(): ReturnType<typeof createResAppStore>;
export declare function useAppStore<T>(selector: (state: AppStoreType) => T): T;
export {};