2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Add AxiosInterceptorOptions to d.ts (#3800)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Tommaso Madonia
2022-03-07 18:26:50 +00:00
committed by GitHub
parent bdb7d76d40
commit 224ed940e1
Vendored
+6 -1
View File
@@ -176,8 +176,13 @@ export interface CancelTokenSource {
cancel: Canceler;
}
export interface AxiosInterceptorOptions {
synchronous?: boolean;
runWhen?: (config: AxiosRequestConfig) => boolean;
}
export interface AxiosInterceptorManager<V> {
use<T = V>(onFulfilled?: (value: V) => T | Promise<T>, onRejected?: (error: any) => any): number;
use<T = V>(onFulfilled?: (value: V) => T | Promise<T>, onRejected?: (error: any) => any, options?: AxiosInterceptorOptions): number;
eject(id: number): void;
}