mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
Add AxiosInterceptorOptions to d.ts (#3800)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Vendored
+6
-1
@@ -176,8 +176,13 @@ export interface CancelTokenSource {
|
|||||||
cancel: Canceler;
|
cancel: Canceler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface AxiosInterceptorOptions {
|
||||||
|
synchronous?: boolean;
|
||||||
|
runWhen?: (config: AxiosRequestConfig) => boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface AxiosInterceptorManager<V> {
|
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;
|
eject(id: number): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user