tmc.js 0.3.11 → 0.3.13
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/lib/message.js +3 -3
- package/package.json +1 -1
- package/types/alibaba.d.ts +286 -286
- package/types/alicom.d.ts +2 -2
- package/types/aliexpress.d.ts +1 -1
- package/types/alitrip.d.ts +31 -31
- package/types/banma.d.ts +1 -1
- package/types/cainiao.d.ts +1 -1
- package/types/damai.d.ts +1 -1
- package/types/fliggy.d.ts +10 -10
- package/types/fuwu.d.ts +2 -2
- package/types/gov.d.ts +2 -2
- package/types/idle.d.ts +3 -3
- package/types/message.out.d.ts +52 -42
- package/types/taobao.d.ts +457 -457
- package/types/tmall.d.ts +49 -49
- package/types/trip.d.ts +9 -9
- package/types/wdk.d.ts +9 -9
- package/types/xianyu.d.ts +19 -19
- package/types/youku.d.ts +1 -1
package/lib/message.js
CHANGED
|
@@ -131,13 +131,13 @@ class Encoder {
|
|
|
131
131
|
|
|
132
132
|
if (type === 'number') {
|
|
133
133
|
switch (true) {
|
|
134
|
-
case value
|
|
134
|
+
case value >= -128 && value < 127:
|
|
135
135
|
return this.put(Byte).put(value);
|
|
136
136
|
|
|
137
|
-
case value
|
|
137
|
+
case value >= -32_768 && value < 32_767:
|
|
138
138
|
return this.put(Int16).putShort(value);
|
|
139
139
|
|
|
140
|
-
case value
|
|
140
|
+
case value >= -2_147_483_648 && value < 2_147_483_647:
|
|
141
141
|
return this.put(Int32).putInt(value);
|
|
142
142
|
|
|
143
143
|
default:
|