From 1005e3bf14fac3c08f6d9cb1420c935a24758cee Mon Sep 17 00:00:00 2001 From: Paul Sachs Date: Fri, 3 Nov 2017 11:57:12 -0400 Subject: [PATCH] Updating typings The first argument in `axios.interceptors.response.use` is optional, in the case that you just want to intercept an error. Ex: ```ts axios.interceptors.response.use(undefined, error => { ... }); ``` --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 08842113a6..5204a308c8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -92,7 +92,7 @@ export interface CancelTokenSource { } export interface AxiosInterceptorManager { - use(onFulfilled: (value: V) => V | Promise, onRejected?: (error: any) => any): number; + use(onFulfilled?: (value: V) => V | Promise, onRejected?: (error: any) => any): number; eject(id: number): void; }