#### Summary

It would be nice to export a typeguard from Axios' index.d.ts.
This way, consumers trying to do error handling can check in a type-safe way if the error is an AxiosError, or some other kind of error.

It's easy enough to do this as a consumer, but it would be nicer if this was included in the actual Axios library.

test/typescript/axios.ts
const fn2: (arr: number[]) => string = axios.spread(fn1);
axios.get('/user')
  .then((response: AxiosResponse) => 'foo')
  .then((value: string) => {});
axios.get('/user')
  .then((response: AxiosResponse) => Promise.resolve('foo'))
  .then((value: string) => {});
axios.get('/user')
  .then((response: AxiosResponse) => 'foo', (error: any) => 'bar')
  .then((value: string) => {});
axios.get('/user')
  .then((response: AxiosResponse) => 'foo', (error: any) => 123)
  .then((value: string | number) => {});
axios.get('/user')
  .catch((error: any) => 'foo')
  .then((value: string) => {});
axios.get('/user')
  .catch((error: any) => Promise.resolve('foo'))
  .then((value: string) => {});
const source: CancelTokenSource = axios.CancelToken.source();
axios.get('/user', {
  cancelToken: source.token
}).catch((thrown: AxiosError | Cancel) => {
  if (axios.isCancel(thrown)) {
    const cancel: Cancel = thrown;
    console.log(cancel.message);
  }
});
source.cancel('Operation has been canceled.');