simple-queries-react
Version:
Simple Queries React: Streamlined requests, powerful results. Transform your API calls into something simple, fast, and scalable with just a few lines of code.
22 lines (21 loc) • 751 B
TypeScript
import { AnyObject, Extension, FetchHeaders, UseDownloadHook } from "../@types";
export declare function useDownload<P = AnyObject>(props?: UseDownloadHook | string | undefined | AnyObject): {
getResponse: () => string | undefined;
send: (data?: Partial<Partial<{
pathRest: AnyObject;
params: P;
}> & {
download?: boolean | undefined;
fileName?: string | undefined;
extension: Extension;
}> | undefined) => void;
clearResponse: () => void;
isLoading: () => boolean;
cancelLoading: () => void;
getErrors: () => any;
clearErrors: () => void;
setHeaders: (headers: FetchHeaders) => void;
success: boolean;
error: boolean;
msgErrors: any;
};