Skip to content

Commit 7452efd

Browse files
committed
chore(typescript): fix axios/lib/core/createError typings
- c774c01
1 parent 3a53a6f commit 7452efd

File tree

3 files changed

+14
-47
lines changed

3 files changed

+14
-47
lines changed

packages/exceptions/src/typings/axios/lib/core/createError.d.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

packages/exceptions/tsconfig.prod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"rootDir": "src"
55
},
66
"extends": "../../tsconfig.prod.json",
7-
"include": ["src"]
7+
"include": ["src", "typings"]
88
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
declare module 'axios/lib/core/createError' {
2+
import type { AxiosError } from '@packages/exceptions/interfaces'
3+
import type { AxiosRequestConfig, AxiosResponse } from 'axios'
4+
import type { ClientRequest } from 'http'
5+
6+
export default function <Payload = any, Data = any>(
7+
message: string,
8+
config: AxiosRequestConfig<Data>,
9+
code?: string,
10+
request?: ClientRequest,
11+
response?: AxiosResponse<Payload, Data>
12+
): AxiosError<Payload, Data>
13+
}

0 commit comments

Comments
 (0)