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.
19 lines (18 loc) • 680 B
TypeScript
import { AnyObject, FetchHeaders, UseRequestHook } from "../@types";
export declare function usePatch<T, B = AnyObject, P = AnyObject>(props?: UseRequestHook<T> | string | undefined | AnyObject): {
getResponse: () => T | undefined;
send: (data?: string | number | AnyObject | B | Partial<Partial<{
body: B;
pathRest: AnyObject;
params: P;
}>> | undefined) => void;
clearResponse: () => void;
isLoading: () => boolean;
cancelLoading: () => void;
getErrors: () => any;
clearErrors: () => void;
setHeaders: (headers: FetchHeaders) => void;
msgErrors: any;
success: boolean;
error: boolean;
};