From c5f1530b83d7719fe3bfebcbbe066a2c92025f68 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Sun, 9 Oct 2022 12:00:56 +0530 Subject: [PATCH 1/2] fixed type definition use method on AxiosInterceptorManager to match the README --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 806e32284e..60d652db9e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -411,7 +411,7 @@ export interface AxiosInterceptorOptions { } export interface AxiosInterceptorManager { - use(onFulfilled?: (value: V) => V | Promise, onRejected?: (error: any) => any, options?: AxiosInterceptorOptions): number; + use(onFulfilled?: (value: V) => V | Promise | null, onRejected?: (error: any) => any | null, options?: AxiosInterceptorOptions): number; eject(id: number): void; clear(): void; } From 7f6091d85690dc3a13e58fa3bd37570892237758 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Sat, 15 Oct 2022 20:56:55 +0530 Subject: [PATCH 2/2] fixed parentheses issues with type --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index bb1bad2810..9c45ebf44e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -411,7 +411,7 @@ export interface AxiosInterceptorOptions { } export interface AxiosInterceptorManager { - use(onFulfilled?: (value: V) => V | Promise | null, onRejected?: (error: any) => any | null, options?: AxiosInterceptorOptions): number; + use(onFulfilled?: ((value: V) => V | Promise) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions): number; eject(id: number): void; clear(): void; }