Skip to content

Commit

Permalink
Add AxiosInterceptorOptions to d.ts (#3800)
Browse files Browse the repository at this point in the history
Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
Frugghi and jasonsaayman committed Mar 7, 2022
1 parent bdb7d76 commit 224ed94
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.d.ts
Expand Up @@ -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;
}

Expand Down

0 comments on commit 224ed94

Please sign in to comment.