burdy
Version:
Open Source Headless Platform
9 lines (8 loc) • 516 B
TypeScript
import { AxiosResponse } from 'axios';
import { UseAsyncCallbackOptions, UseAsyncReturn } from 'react-async-hook';
declare const apiAxios: import("axios").AxiosInstance;
declare type MaybePromise<T> = Promise<T> | T;
declare type AsyncApiCallback = <R = any, Args extends any[] = []>(asyncFunction: (...args: Args) => MaybePromise<AxiosResponse<R>>, options?: UseAsyncCallbackOptions<R>) => UseAsyncReturn<R, Args>;
declare const useApiCallback: AsyncApiCallback;
export { useApiCallback };
export default apiAxios;