8000 Add AxiosInterceptorOptions to d.ts (#3800) · darth-coder-js/axios@224ed94 · GitHub
[go: up one dir, main page]

Skip to content

Commit 224ed94

Browse files
Add AxiosInterceptorOptions to d.ts (axios#3800)
Co-authored-by: Jay <jasonsaayman@gmail.com>
1 parent bdb7d76 commit 224ed94

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,13 @@ export interface CancelTokenSource {
176176
cancel: Canceler;
177177
}
178178

179+
export interface AxiosInterceptorOptions {
180+
synchronous?: boolean;
181+
runWhen?: (config: AxiosRequestConfig) => boolean;
182+
}
183+
179184
export interface AxiosInterceptorManager<V> {
180-
use<T = V>(onFulfilled?: (value: V) => T | Promise<T>, onRejected?: (error: any) => any): number;
185+
use<T = V>(onFulfilled?: (value: V) => T | Promise<T>, onRejected?: (error: any) => any, options?: AxiosInterceptorOptions): number;
181186
eject(id: number): void;
182187
}
183188

0 commit comments

Comments
 (0)
0