@tarojs/taro 3.4.0-beta.0 → 3.4.0-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "3.4.0-beta.0",
3
+ "version": "3.4.0-beta.1",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -26,9 +26,9 @@
26
26
  "author": "O2Team",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@tarojs/api": "3.4.0-beta.0",
30
- "@tarojs/runtime": "3.4.0-beta.0",
31
- "@tarojs/taro-h5": "3.4.0-beta.0"
29
+ "@tarojs/api": "3.4.0-beta.1",
30
+ "@tarojs/runtime": "3.4.0-beta.1",
31
+ "@tarojs/taro-h5": "3.4.0-beta.1"
32
32
  },
33
- "gitHead": "107670bc2360ee9136a0e558e6d5fad1db640fba"
33
+ "gitHead": "bd7b3674278d22f71e2658b530cc0be24bf9964e"
34
34
  }
@@ -69,7 +69,7 @@ declare module '../../../index' {
69
69
  * - 开发者可以在回调中进行页面重定向,但必须在回调中**同步**处理,异步处理(例如 `setTimeout` 异步执行)无效。
70
70
  * - 若开发者没有调用 [Taro.onPageNotFound](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onPageNotFound.html) 绑定监听,也没有声明 `App.onPageNotFound`,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。
71
71
  * - 如果回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再第二次回调。
72
- * @supported weapp
72
+ * @supported weapp, h5
73
73
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onPageNotFound.html
74
74
  */
75
75
  onPageNotFound(callback: onPageNotFound.Callback): void
@@ -1374,7 +1374,7 @@ declare module '../../index' {
1374
1374
  /** 阴影的模糊级别 */
1375
1375
  shadowBlur: number
1376
1376
  /** 阴影的颜色 */
1377
- shadowColor: number
1377
+ shadowColor: string
1378
1378
  /** 阴影相对于形状在水平方向的偏移 */
1379
1379
  shadowOffsetX: number
1380
1380
  /** 阴影相对于形状在竖直方向的偏移 */
@@ -94,7 +94,7 @@ declare module '../../index' {
94
94
  ): void
95
95
 
96
96
  /** 取消监听罗盘数据变化事件,参数为空,则取消所有的事件监听。
97
- * @supported weapp
97
+ * @supported weapp, h5
98
98
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/compass/wx.offCompassChange.html
99
99
  */
100
100
  offCompassChange(
@@ -122,6 +122,8 @@ declare module '../../index' {
122
122
  sourceType?: Array<keyof sourceType>
123
123
  /** 接口调用成功的回调函数 */
124
124
  success?: (result: SuccessCallbackResult) => void
125
+ /** 用来上传的input元素ID(仅h5端)@supported h5 */
126
+ imageId?: string
125
127
  }
126
128
  /** 图片的尺寸 */
127
129
  interface sizeType {
@@ -191,6 +191,6 @@ declare module '../../index' {
191
191
  * ```
192
192
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html
193
193
  */
194
- chooseVideo(option: chooseVideo.Option): Promise<void>
194
+ chooseVideo(option: chooseVideo.Option): Promise<chooseVideo.SuccessCallbackResult>
195
195
  }
196
196
  }
@@ -58,6 +58,12 @@ declare module '../../index' {
58
58
  /** 已经下载的数据长度,单位 Bytes */
59
59
  totalBytesWritten: number
60
60
  }
61
+
62
+ type DownloadTaskPromise = Promise<DownloadTask> & {
63
+ headersReceive: DownloadTask['onHeadersReceived'],
64
+ progress: DownloadTask['onProgressUpdate'],
65
+ abort: DownloadTask['abort']
66
+ }
61
67
  }
62
68
 
63
69
  interface DownloadTask {
@@ -121,6 +127,6 @@ declare module '../../index' {
121
127
  * ```
122
128
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/download/wx.downloadFile.html
123
129
  */
124
- downloadFile(option: downloadFile.Option): DownloadTask
130
+ downloadFile(option: downloadFile.Option): DownloadTask.DownloadTaskPromise
125
131
  }
126
132
  }
@@ -67,6 +67,12 @@ declare module '../../index' {
67
67
  /** 已经上传的数据长度,单位 Bytes */
68
68
  totalBytesSent: number
69
69
  }
70
+
71
+ type UploadTaskPromise = Promise<UploadTask> & {
72
+ headersReceive: UploadTask['onHeadersReceived'],
73
+ progress: UploadTask['onProgressUpdate'],
74
+ abort: UploadTask['abort']
75
+ }
70
76
  }
71
77
 
72
78
  /** 一个可以监听上传进度变化事件,以及取消上传任务的对象
@@ -166,6 +172,6 @@ declare module '../../index' {
166
172
  * ```
167
173
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html
168
174
  */
169
- uploadFile(option: uploadFile.Option): Promise<uploadFile.SuccessCallbackResult & UploadTask> & UploadTask
175
+ uploadFile(option: uploadFile.Option): UploadTask.UploadTaskPromise
170
176
  }
171
177
  }
@@ -10,6 +10,11 @@ declare module '../../index' {
10
10
  /** 动画的效果 */
11
11
  timingFunction?: keyof timingFunction
12
12
  transformOrigin?: string
13
+ /**
14
+ * 单位
15
+ * @supported h5
16
+ */
17
+ unit?: string
13
18
  }
14
19
  interface timingFunction {
15
20
  /** 动画从头到尾的速度是相同的 */
@@ -31,14 +36,14 @@ declare module '../../index' {
31
36
 
32
37
  interface Animation {
33
38
  /** 导出动画队列。**export 方法每次调用后会清掉之前的动画操作。**
34
- * @supported weapp
39
+ * @supported weapp, h5
35
40
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.export.html
36
41
  */
37
42
  export(): {
38
43
  actions: TaroGeneral.IAnyObject[]
39
44
  }
40
45
  /** 设置背景色
41
- * @supported weapp
46
+ * @supported weapp, h5
42
47
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.backgroundColor.html
43
48
  */
44
49
  backgroundColor(
@@ -46,7 +51,7 @@ declare module '../../index' {
46
51
  value: string,
47
52
  ): Animation
48
53
  /** 设置 bottom 值
49
- * @supported weapp
54
+ * @supported weapp, h5
50
55
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.bottom.html
51
56
  */
52
57
  bottom(
@@ -54,7 +59,7 @@ declare module '../../index' {
54
59
  value: number | string,
55
60
  ): Animation
56
61
  /** 设置高度
57
- * @supported weapp
62
+ * @supported weapp, h5
58
63
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.height.html
59
64
  */
60
65
  height(
@@ -62,7 +67,7 @@ declare module '../../index' {
62
67
  value: number | string,
63
68
  ): Animation
64
69
  /** 设置 left 值
65
- * @supported weapp
70
+ * @supported weapp, h5
66
71
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.left.html
67
72
  */
68
73
  left(
@@ -70,17 +75,17 @@ declare module '../../index' {
70
75
  value: number | string,
71
76
  ): Animation
72
77
  /** 同 [transform-function matrix](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix)
73
- * @supported weapp
78
+ * @supported weapp, h5
74
79
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix.html
75
80
  */
76
- matrix(): Animation
81
+ matrix(a: number, b: number, c: number, d: number, tx: number, ty: number): Animation
77
82
  /** 同 [transform-function matrix3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d)
78
83
  * @supported weapp
79
84
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.matrix3d.html
80
85
  */
81
- matrix3d(): Animation
86
+ matrix3d(a1: number, b1: number, c1: number, d1: number, a2: number, b2: number, c2: number, d2: number, a3: number, b3: number, c3: number, d3: number, a4: number, b4: number, c4: number, d4: number): Animation
82
87
  /** 设置透明度
83
- * @supported weapp
88
+ * @supported weapp, h5
84
89
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.opacity.html
85
90
  */
86
91
  opacity(
@@ -88,7 +93,7 @@ declare module '../../index' {
88
93
  value: number,
89
94
  ): Animation
90
95
  /** 设置 right 值
91
- * @supported weapp
96
+ * @supported weapp, h5
92
97
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.right.html
93
98
  */
94
99
  right(
@@ -96,7 +101,7 @@ declare module '../../index' {
96
101
  value: number | string,
97
102
  ): Animation
98
103
  /** 从原点顺时针旋转一个角度
99
- * @supported weapp
104
+ * @supported weapp, h5
100
105
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate.html
101
106
  */
102
107
  rotate(
@@ -104,21 +109,21 @@ declare module '../../index' {
104
109
  angle: number,
105
110
  ): Animation
106
111
  /** 从 固定 轴顺时针旋转一个角度
107
- * @supported weapp
112
+ * @supported weapp, h5
108
113
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotate3d.html
109
114
  */
110
115
  rotate3d(
111
116
  /** 旋转轴的 x 坐标 */
112
117
  x: number,
113
118
  /** 旋转轴的 y 坐标 */
114
- y: number,
119
+ y?: number,
115
120
  /** 旋转轴的 z 坐标 */
116
- z: number,
121
+ z?: number,
117
122
  /** 旋转的角度。范围 [-180, 180] */
118
- angle: number,
123
+ angle?: number,
119
124
  ): Animation
120
125
  /** 从 X 轴顺时针旋转一个角度
121
- * @supported weapp
126
+ * @supported weapp, h5
122
127
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateX.html
123
128
  */
124
129
  rotateX(
@@ -126,7 +131,7 @@ declare module '../../index' {
126
131
  angle: number,
127
132
  ): Animation
128
133
  /** 从 Y 轴顺时针旋转一个角度
129
- * @supported weapp
134
+ * @supported weapp, h5
130
135
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateY.html
131
136
  */
132
137
  rotateY(
@@ -134,7 +139,7 @@ declare module '../../index' {
134
139
  angle: number,
135
140
  ): Animation
136
141
  /** 从 Z 轴顺时针旋转一个角度
137
- * @supported weapp
142
+ * @supported weapp, h5
138
143
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.rotateZ.html
139
144
  */
140
145
  rotateZ(
@@ -142,7 +147,7 @@ declare module '../../index' {
142
147
  angle: number,
143
148
  ): Animation
144
149
  /** 缩放
145
- * @supported weapp
150
+ * @supported weapp, h5
146
151
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale.html
147
152
  */
148
153
  scale(
@@ -152,7 +157,7 @@ declare module '../../index' {
152
157
  sy?: number,
153
158
  ): Animation
154
159
  /** 缩放
155
- * @supported weapp
160
+ * @supported weapp, h5
156
161
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scale3d.html
157
162
  */
158
163
  scale3d(
@@ -164,7 +169,7 @@ declare module '../../index' {
164
169
  sz: number,
165
170
  ): Animation
166
171
  /** 缩放 X 轴
167
- * @supported weapp
172
+ * @supported weapp, h5
168
173
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleX.html
169
174
  */
170
175
  scaleX(
@@ -172,7 +177,7 @@ declare module '../../index' {
172
177
  scale: number,
173
178
  ): Animation
174
179
  /** 缩放 Y 轴
175
- * @supported weapp
180
+ * @supported weapp, h5
176
181
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleY.html
177
182
  */
178
183
  scaleY(
@@ -180,7 +185,7 @@ declare module '../../index' {
180
185
  scale: number,
181
186
  ): Animation
182
187
  /** 缩放 Z 轴
183
- * @supported weapp
188
+ * @supported weapp, h5
184
189
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.scaleZ.html
185
190
  */
186
191
  scaleZ(
@@ -198,7 +203,7 @@ declare module '../../index' {
198
203
  ay: number,
199
204
  ): Animation
200
205
  /** 对 X 轴坐标进行倾斜
201
- * @supported weapp
206
+ * @supported weapp, h5
202
207
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.skewX.html
203
208
  */
204
209
  skewX(
@@ -214,12 +219,12 @@ declare module '../../index' {
214
219
  angle: number,
215
220
  ): Animation
216
221
  /** 表示一组动画完成。可以在一组动画中调用任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。
217
- * @supported weapp
222
+ * @supported weapp, h5
218
223
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.step.html
219
224
  */
220
225
  step(option?: Animation.StepOption): Animation
221
226
  /** 设置 top 值
222
- * @supported weapp
227
+ * @supported weapp, h5
223
228
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.top.html
224
229
  */
225
230
  top(
@@ -227,7 +232,7 @@ declare module '../../index' {
227
232
  value: number | string,
228
233
  ): Animation
229
234
  /** 平移变换
230
- * @supported weapp
235
+ * @supported weapp, h5
231
236
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate.html
232
237
  */
233
238
  translate(
@@ -237,7 +242,7 @@ declare module '../../index' {
237
242
  ty?: number,
238
243
  ): Animation
239
244
  /** 对 xyz 坐标进行平移变换
240
- * @supported weapp
245
+ * @supported weapp, h5
241
246
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translate3d.html
242
247
  */
243
248
  translate3d(
@@ -249,7 +254,7 @@ declare module '../../index' {
249
254
  tz?: number,
250
255
  ): Animation
251
256
  /** 对 X 轴平移
252
- * @supported weapp
257
+ * @supported weapp, h5
253
258
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateX.html
254
259
  */
255
260
  translateX(
@@ -257,7 +262,7 @@ declare module '../../index' {
257
262
  translation: number,
258
263
  ): Animation
259
264
  /** 对 Y 轴平移
260
- * @supported weapp
265
+ * @supported weapp, h5
261
266
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateY.html
262
267
  */
263
268
  translateY(
@@ -265,7 +270,7 @@ declare module '../../index' {
265
270
  translation: number,
266
271
  ): Animation
267
272
  /** 对 Z 轴平移
268
- * @supported weapp
273
+ * @supported weapp, h5
269
274
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.translateZ.html
270
275
  */
271
276
  translateZ(
@@ -273,7 +278,7 @@ declare module '../../index' {
273
278
  translation: number,
274
279
  ): Animation
275
280
  /** 设置宽度
276
- * @supported weapp
281
+ * @supported weapp, h5
277
282
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/Animation.width.html
278
283
  */
279
284
  width(
@@ -15,9 +15,10 @@ declare module '../../index' {
15
15
  *
16
16
  * 可选值:
17
17
  * - 'success': 显示成功图标,此时 title 文本最多显示 7 个汉字长度;
18
+ * - 'error': 显示失败图标,此时 title 文本最多显示 7 个汉字长度;
18
19
  * - 'loading': 显示加载图标,此时 title 文本最多显示 7 个汉字长度;
19
20
  * - 'none': 不显示图标,此时 title 文本最多可显示两行 */
20
- icon?: 'success' | 'loading' | 'none'
21
+ icon?: 'success' | 'error' | 'loading' | 'none'
21
22
  /** 自定义图标的本地路径,image 的优先级高于 icon */
22
23
  image?: string
23
24
  /** 是否显示透明蒙层,防止触摸穿透 */
@@ -78,6 +79,8 @@ declare module '../../index' {
78
79
 
79
80
  namespace showActionSheet {
80
81
  interface Option {
82
+ /** 警示文案 */
83
+ alertText?: string
81
84
  /** 按钮的文字数组,数组长度最大为 6 */
82
85
  itemList: string[]
83
86
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
@@ -121,6 +124,8 @@ declare module '../../index' {
121
124
 
122
125
  namespace enableAlertBeforeUnload {
123
126
  interface Option {
127
+ /** 询问对话框内容 */
128
+ message: string
124
129
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
125
130
  complete?: (res: TaroGeneral.CallbackResult) => void
126
131
  /** 接口调用失败的回调函数 */
@@ -257,7 +262,7 @@ declare module '../../index' {
257
262
  * ```
258
263
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.enableAlertBeforeUnload.html
259
264
  */
260
- enableAlertBeforeUnload(option?: enableAlertBeforeUnload.Option): void
265
+ enableAlertBeforeUnload(option: enableAlertBeforeUnload.Option): void
261
266
 
262
267
  /** 关闭小程序页面返回询问对话框
263
268
  * @supported weapp
@@ -209,10 +209,6 @@ declare enum LogLevel {
209
209
  DEBUG = 'debug'
210
210
  }
211
211
 
212
- export interface IDeviceRatio {
213
- [key: string]: number
214
- }
215
-
216
212
  export type SystemConfig = {
217
213
  /**
218
214
  * 打印日志等级,分为 off,error,warn,info,log,debug
@@ -361,7 +357,7 @@ export interface IProjectBaseConfig {
361
357
  date?: string,
362
358
  designWidth?: number,
363
359
  watcher?: any[],
364
- deviceRatio?: IDeviceRatio,
360
+ deviceRatio?: TaroGeneral.TDeviceRatio,
365
361
  sourceRoot?: string,
366
362
  outputRoot?: string,
367
363
  env?: IOption,
package/types/global.d.ts CHANGED
@@ -387,4 +387,6 @@ declare namespace TaroGeneral {
387
387
  QQ = 'QQ',
388
388
  JD = 'JD'
389
389
  }
390
+
391
+ type TDeviceRatio = Record<string, number>
390
392
  }
package/types/index.d.ts CHANGED
@@ -136,3 +136,7 @@ declare namespace Taro {
136
136
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
137
137
  interface TaroStatic {}
138
138
  }
139
+ declare global {
140
+ const defineAppConfig: (config: Taro.Config) => Taro.Config
141
+ const definePageConfig: (config: Taro.Config) => Taro.Config
142
+ }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="vue" />
3
3
 
4
- import Taro, { ComponentOptions, Config, RouterInfo } from './index'
4
+ import Taro, { Config } from './index'
5
5
 
6
6
  declare module './index' {
7
7
  // Components
@@ -235,7 +235,24 @@ declare module './index' {
235
235
  }
236
236
  }
237
237
 
238
+ interface RouterAnimate {
239
+ /**
240
+ * 动画切换时间,单位毫秒
241
+ * @default 300
242
+ */
243
+ duration?: number
244
+ /**
245
+ * 动画切换时间,单位毫秒
246
+ * @default 50
247
+ */
248
+ delay?: number
249
+ }
250
+
238
251
  interface AppConfig {
252
+ /**
253
+ * 小程序默认启动首页,未指定 entryPagePath 时,数组的第一项代表小程序的初始页面(首页)。
254
+ */
255
+ entryPagePath?: string
239
256
  /**
240
257
  * 接受一个数组,每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序的初始页面
241
258
  */
@@ -331,6 +348,18 @@ declare module './index' {
331
348
  * 接受一个数组,每一项都是字符串,来指定编译为原生小程序组件的组件入口
332
349
  */
333
350
  components?: string[]
351
+ /**
352
+ * 渲染页面的容器 id
353
+ * @default "app"
354
+ * @since 3.3.18
355
+ */
356
+ appId?: string
357
+ /**
358
+ * 是否开启h5端路由动画功能,默认关闭
359
+ * @supported h5
360
+ * @since 3.3.18
361
+ */
362
+ animation?: RouterAnimate | boolean
334
363
  }
335
364
 
336
365
  interface Config extends PageConfig, AppConfig {
@@ -354,6 +383,7 @@ declare module './index' {
354
383
  PreloadRule: PreloadRule
355
384
  Permission: Permission
356
385
  AppConfig: AppConfig
386
+ RouterAnimate: RouterAnimate
357
387
  Config: Config
358
388
  }
359
389
  }
@@ -46,10 +46,27 @@ declare module './index' {
46
46
  install (app: any, data: any): void
47
47
  }
48
48
 
49
+ interface TARO_ENV_TYPE {
50
+ [TaroGeneral.ENV_TYPE.WEAPP]: TaroGeneral.ENV_TYPE.WEAPP
51
+ [TaroGeneral.ENV_TYPE.WEB]: TaroGeneral.ENV_TYPE.WEB
52
+ [TaroGeneral.ENV_TYPE.RN]: TaroGeneral.ENV_TYPE.RN
53
+ [TaroGeneral.ENV_TYPE.SWAN]: TaroGeneral.ENV_TYPE.SWAN
54
+ [TaroGeneral.ENV_TYPE.ALIPAY]: TaroGeneral.ENV_TYPE.ALIPAY
55
+ [TaroGeneral.ENV_TYPE.TT]: TaroGeneral.ENV_TYPE.TT
56
+ [TaroGeneral.ENV_TYPE.QQ]: TaroGeneral.ENV_TYPE.QQ
57
+ [TaroGeneral.ENV_TYPE.JD]: TaroGeneral.ENV_TYPE.JD
58
+ }
59
+
49
60
  interface TaroStatic {
61
+ Events: {
62
+ new (): TaroGeneral.Events
63
+ }
64
+
50
65
  // eventCenter
51
66
  eventCenter: TaroGeneral.Events
52
67
 
68
+ ENV_TYPE: TARO_ENV_TYPE
69
+
53
70
  getEnv(): TaroGeneral.ENV_TYPE
54
71
 
55
72
  render(component: Component | JSX.Element, element: Element | null): any
@@ -60,7 +77,7 @@ declare module './index' {
60
77
  atMessage(options: AtMessageOptions): void
61
78
 
62
79
  pxTransform(size: number, designWidth?: number): string
63
- initPxTransform(config: { designWidth: number; deviceRatio: object }): void
80
+ initPxTransform(config: { designWidth: number; deviceRatio: TaroGeneral.TDeviceRatio }): void
64
81
 
65
82
  addInterceptor(interceptor: interceptor): any
66
83