node-easywechat 3.5.15 → 3.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/Core/Message.d.ts +1 -1
- package/dist/Core/Message.js +4 -0
- package/dist/Types/shim-axios.d.ts +11 -11
- package/package.json +1 -1
- package/dist/Types/common.d.ts +0 -2
package/CHANGELOG.md
CHANGED
package/dist/Core/Message.d.ts
CHANGED
package/dist/Core/Message.js
CHANGED
|
@@ -26,6 +26,8 @@ class Message {
|
|
|
26
26
|
this.originContent = originContent;
|
|
27
27
|
return new Proxy(this, {
|
|
28
28
|
set: function (obj, key, val) {
|
|
29
|
+
if (typeof key === 'symbol')
|
|
30
|
+
key = key.toString();
|
|
29
31
|
if (typeof obj[key] !== 'undefined') {
|
|
30
32
|
obj[key] = val;
|
|
31
33
|
}
|
|
@@ -35,6 +37,8 @@ class Message {
|
|
|
35
37
|
return true;
|
|
36
38
|
},
|
|
37
39
|
get: function (obj, key) {
|
|
40
|
+
if (typeof key === 'symbol')
|
|
41
|
+
key = key.toString();
|
|
38
42
|
if (typeof obj[key] !== 'undefined') {
|
|
39
43
|
return obj[key];
|
|
40
44
|
}
|
|
@@ -4,28 +4,28 @@ import axios from 'axios';
|
|
|
4
4
|
declare module 'axios' {
|
|
5
5
|
|
|
6
6
|
interface AxiosInstance {
|
|
7
|
-
<T =
|
|
8
|
-
request<T =
|
|
9
|
-
get<T =
|
|
10
|
-
delete<T =
|
|
11
|
-
head<T =
|
|
12
|
-
post<T =
|
|
13
|
-
put<T =
|
|
14
|
-
patch<T =
|
|
7
|
+
<T = Record<string, any>, R = AxiosResponse<T>>(config: AxiosRequestConfig): Promise<R>;
|
|
8
|
+
request<T = Record<string, any>, R = AxiosResponse<T>>(config: AxiosRequestConfig): Promise<R>;
|
|
9
|
+
get<T = Record<string, any>, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
|
|
10
|
+
delete<T = Record<string, any>, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
|
|
11
|
+
head<T = Record<string, any>, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
|
|
12
|
+
post<T = Record<string, any>, R = AxiosResponse<T>>(url: string, data?: Record<string, any>, config?: AxiosRequestConfig): Promise<R>;
|
|
13
|
+
put<T = Record<string, any>, R = AxiosResponse<T>>(url: string, data?: Record<string, any>, config?: AxiosRequestConfig): Promise<R>;
|
|
14
|
+
patch<T = Record<string, any>, R = AxiosResponse<T>>(url: string, data?: Record<string, any>, config?: AxiosRequestConfig): Promise<R>;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
interface AxiosRequestConfig {
|
|
18
18
|
/**
|
|
19
19
|
* 要发送的xml数据,会自动解析并赋值到data属性,同时设置content-type=text/xml
|
|
20
20
|
*/
|
|
21
|
-
xml?: string |
|
|
21
|
+
xml?: string | Record<string, any>;
|
|
22
22
|
/**
|
|
23
23
|
* 要发送的json数据,会自动解析并赋值到data属性,同时设置content-type=application/json
|
|
24
24
|
*/
|
|
25
|
-
json?: string |
|
|
25
|
+
json?: string | Record<string, any>;
|
|
26
26
|
/**
|
|
27
27
|
* 要发送的FormData数据,会自动解析并赋值到data属性,同时设置根据内容提取headers
|
|
28
28
|
*/
|
|
29
|
-
formData?:
|
|
29
|
+
formData?: Record<string, any>;
|
|
30
30
|
}
|
|
31
31
|
}
|
package/package.json
CHANGED
package/dist/Types/common.d.ts
DELETED