2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

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 => {
...
});
```
This commit is contained in:
Paul Sachs
2017-11-03 11:57:12 -04:00
committed by GitHub
parent 1ee5494038
commit 1005e3bf14
Vendored
+1 -1
View File
@@ -92,7 +92,7 @@ export interface CancelTokenSource {
}
export interface AxiosInterceptorManager<V> {
use(onFulfilled: (value: V) => V | Promise<V>, onRejected?: (error: any) => any): number;
use(onFulfilled?: (value: V) => V | Promise<V>, onRejected?: (error: any) => any): number;
eject(id: number): void;
}