From 224ed940e15b615336bc104b3478b137f7a48b86 Mon Sep 17 00:00:00 2001 From: Tommaso Madonia Date: Mon, 7 Mar 2022 18:26:50 +0000 Subject: [PATCH] Add AxiosInterceptorOptions to d.ts (#3800) Co-authored-by: Jay --- index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index c028ca4..b2b2766 100644 --- a/index.d.ts +++ b/index.d.ts @@ -176,8 +176,13 @@ export interface CancelTokenSource { cancel: Canceler; } +export interface AxiosInterceptorOptions { + synchronous?: boolean; + runWhen?: (config: AxiosRequestConfig) => boolean; +} + export interface AxiosInterceptorManager { - use(onFulfilled?: (value: V) => T | Promise, onRejected?: (error: any) => any): number; + use(onFulfilled?: (value: V) => T | Promise, onRejected?: (error: any) => any, options?: AxiosInterceptorOptions): number; eject(id: number): void; }