mt-flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
47 lines (46 loc) • 1.97 kB
TypeScript
/**
* 开发调试辅助,通过界面发出 http api 请求。
*/
import { z } from 'zod';
import { StateCreator } from 'zustand';
declare const httpReqSchema: z.ZodObject<{
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url: string;
}>;
export type HttpToolReq = z.infer<typeof httpReqSchema>;
export interface HttpToolSlice {
formValues: HttpToolReq;
schema: z.ZodType;
sendRequest: () => void;
histories: any[];
}
export declare const createHttpToolSlice: StateCreator<HttpToolSlice, [
], [
], HttpToolSlice>;
export type BoundStoreType = ReturnType<typeof createHttpToolStore>;
export declare const createHttpToolStore: () => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<HttpToolSlice>, "persist"> & {
persist: {
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<HttpToolSlice, HttpToolSlice>>) => void;
clearStorage: () => void;
rehydrate: () => void | Promise<void>;
hasHydrated: () => boolean;
onHydrate: (fn: (state: HttpToolSlice) => void) => () => void;
onFinishHydration: (fn: (state: HttpToolSlice) => void) => () => void;
getOptions: () => Partial<import("zustand/middleware").PersistOptions<HttpToolSlice, HttpToolSlice>>;
};
}>;
export declare const useHttpToolStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<HttpToolSlice>, "persist"> & {
persist: {
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<HttpToolSlice, HttpToolSlice>>) => void;
clearStorage: () => void;
rehydrate: () => void | Promise<void>;
hasHydrated: () => boolean;
onHydrate: (fn: (state: HttpToolSlice) => void) => () => void;
onFinishHydration: (fn: (state: HttpToolSlice) => void) => () => void;
getOptions: () => Partial<import("zustand/middleware").PersistOptions<HttpToolSlice, HttpToolSlice>>;
};
}>;
export {};