UNPKG

react-js-plugins

Version:

A powerful and efficient React utility library designed to enhance application performance by streamlining and simplifying the management of complex asynchronous operations.

15 lines (14 loc) 752 B
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios'; interface AxiosConfigProps { baseURL: string; handleAuthError?: (axiosInstance: AxiosInstance, originalRequest: AxiosRequestConfig, err: AxiosError) => Promise<AxiosResponse>; timeout: number; } export declare const createPrivateInstance: ({ baseURL, handleAuthError, timeout }: AxiosConfigProps) => AxiosInstance; interface AxiosNoAuthConfigProps { baseURL: string; timeout?: number; handleError?: (instance: AxiosInstance, originalRequest: AxiosRequestConfig, error: AxiosError) => Promise<AxiosResponse>; } export declare const createPublicInstance: ({ baseURL, timeout, handleError }: AxiosNoAuthConfigProps) => AxiosInstance; export {};