Skip to content

Commit

Permalink
Make AxiosError.config optional in the type definition (#4665)
Browse files Browse the repository at this point in the history
It is optional in the constructor, and not always defined.

Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
tusbar and jasonsaayman committed May 3, 2022
1 parent 12faca8 commit 205bd0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -148,7 +148,7 @@ export class AxiosError<T = unknown, D = any> extends Error {
response?: AxiosResponse<T, D>
);

config: AxiosRequestConfig<D>;
config?: AxiosRequestConfig<D>;
code?: string;
request?: any;
response?: AxiosResponse<T, D>;
Expand Down

0 comments on commit 205bd0f

Please sign in to comment.