2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

refactor: add missing types for static AxiosError.from method (#4956)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Philipp Loose
2022-12-01 19:36:42 +01:00
committed by GitHub
parent e1a4efe638
commit 6f59cdbac9
Vendored
+8
View File
@@ -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";