Skip to content

Commit

Permalink
refactor: add missing types for static AxiosError.from method
Browse files Browse the repository at this point in the history
  • Loading branch information
phloose committed Nov 30, 2022
1 parent 786b113 commit 7e2b109
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.d.ts
Expand Up @@ -371,6 +371,14 @@ export class AxiosError<T = unknown, D = any> extends Error {
status?: number;
toJSON: () => object;
cause?: Error;
static from<T = unknown, D = any>(
error: Error | unknown,
code?: string,
config?: AxiosRequestConfig<D>,
request?: any,
response?: AxiosResponse<T, D>,
customProps?: object,
): AxiosError<T, D>;
static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION";
Expand Down

0 comments on commit 7e2b109

Please sign in to comment.