UNPKG

interceptor-builder

Version:

A modern collection of reusable utility functions for JavaScript and TypeScript, designed to simplify everyday development tasks.

10 lines (9 loc) 417 B
import type { AxiosInstance, AxiosInterceptorManager, AxiosResponse, InternalAxiosRequestConfig } from "axios"; type Req = AxiosInterceptorManager<InternalAxiosRequestConfig<any>>; type Res = AxiosInterceptorManager<AxiosResponse<any, any>>; type Instance = AxiosInstance; interface Interceptor { instance: Instance; intercept(req: Req, res: Res): Instance; } export type { Interceptor, Req, Res, Instance };