@tarojs/taro 4.0.0-canary.8 → 4.0.0
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 +38 -17
- package/types/api/base/debug.d.ts +8 -8
- package/types/api/base/env.d.ts +2 -2
- package/types/api/base/index.d.ts +3 -3
- package/types/api/base/performance.d.ts +1 -1
- package/types/api/base/system.d.ts +6 -6
- package/types/api/base/weapp/app-event.d.ts +10 -10
- package/types/api/base/weapp/life-cycle.d.ts +1 -1
- package/types/api/canvas/index.d.ts +367 -63
- package/types/api/device/battery.d.ts +1 -1
- package/types/api/device/clipboard.d.ts +2 -2
- package/types/api/device/keyboard.d.ts +1 -1
- package/types/api/device/network.d.ts +3 -3
- package/types/api/device/phone.d.ts +1 -1
- package/types/api/device/screen.d.ts +2 -2
- package/types/api/files/index.d.ts +7 -7
- package/types/api/framework/index.d.ts +2 -2
- package/types/api/location/index.d.ts +4 -4
- package/types/api/media/audio.d.ts +21 -12
- package/types/api/media/background-audio.d.ts +1 -1
- package/types/api/media/image.d.ts +10 -10
- package/types/api/media/video.d.ts +11 -11
- package/types/api/navigate/index.d.ts +1 -1
- package/types/api/network/download.d.ts +5 -5
- package/types/api/network/request.d.ts +8 -8
- package/types/api/network/upload.d.ts +7 -7
- package/types/api/network/websocket.d.ts +8 -8
- package/types/api/open-api/account.d.ts +1 -1
- package/types/api/open-api/address.d.ts +13 -5
- package/types/api/open-api/authorize.d.ts +1 -1
- package/types/api/open-api/channels.d.ts +16 -0
- package/types/api/open-api/device-voip.d.ts +40 -0
- package/types/api/open-api/invoice.d.ts +1 -1
- package/types/api/open-api/login.d.ts +15 -2
- package/types/api/open-api/privacy.d.ts +8 -0
- package/types/api/open-api/settings.d.ts +3 -2
- package/types/api/open-api/sticker.d.ts +83 -0
- package/types/api/open-api/subscribe-message.d.ts +148 -6
- package/types/api/open-api/user-info.d.ts +6 -1
- package/types/api/qq/index.d.ts +306 -1
- package/types/api/route/index.d.ts +5 -5
- package/types/api/storage/index.d.ts +10 -10
- package/types/api/swan/bookshelf.d.ts +307 -0
- package/types/api/swan/download-package.d.ts +80 -0
- package/types/api/swan/index.d.ts +151 -0
- package/types/api/swan/pay.d.ts +139 -0
- package/types/api/taro.extend.d.ts +3 -2
- package/types/api/taro.hooks.d.ts +9 -9
- package/types/api/ui/animation.d.ts +32 -32
- package/types/api/ui/custom-component.d.ts +1 -1
- package/types/api/ui/fonts.d.ts +1 -1
- package/types/api/ui/interaction.d.ts +6 -6
- package/types/api/ui/menu.d.ts +1 -1
- package/types/api/ui/navigation-bar.d.ts +2 -2
- package/types/api/ui/pull-down-refresh.d.ts +2 -2
- package/types/api/ui/scroll.d.ts +1 -1
- package/types/api/ui/tab-bar.d.ts +8 -8
- package/types/api/ui/window.d.ts +2 -2
- package/types/api/wxml/index.d.ts +30 -24
- package/types/compile/compiler.d.ts +6 -2
- package/types/compile/config/h5.d.ts +9 -4
- package/types/compile/config/harmony.d.ts +43 -7
- package/types/compile/config/index.d.ts +1 -0
- package/types/compile/config/mini.d.ts +2 -16
- package/types/compile/config/project.d.ts +26 -8
- package/types/compile/config/rn.d.ts +22 -1
- package/types/compile/index.d.ts +8 -0
- package/types/compile/viteCompilerContext.d.ts +7 -3
- package/types/global.d.ts +2 -1
- package/types/index.d.ts +91 -46
- package/types/taro.api.d.ts +22 -14
- package/types/taro.component.d.ts +3 -0
- package/types/taro.config.d.ts +13 -4
- package/types/taro.lifecycle.d.ts +3 -0
- package/types/taro.runtime.d.ts +9 -0
package/types/index.d.ts
CHANGED
|
@@ -3,51 +3,64 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 目录结构
|
|
5
5
|
* ├── api 小程序端能力 API
|
|
6
|
-
* │
|
|
6
|
+
* │ ├── ad
|
|
7
7
|
* │ │ └── index.d.ts 广告 API
|
|
8
|
-
* │
|
|
8
|
+
* │ ├── ai
|
|
9
|
+
* │ │ ├── face.d.ts 人脸检测 API
|
|
10
|
+
* │ │ ├── inference.d.ts AI 推理 API
|
|
11
|
+
* │ │ └── visionkit.d.ts 视觉算法 API
|
|
12
|
+
* │ ├── alipay
|
|
9
13
|
* │ │ └── index.d.ts 支付宝小程序 API
|
|
10
|
-
* │
|
|
14
|
+
* │ ├── base
|
|
11
15
|
* │ │ ├── index.d.ts 基础 API
|
|
16
|
+
* │ │ ├── crypto.d.ts 基础 -> 加密 API
|
|
12
17
|
* │ │ ├── debug.d.ts 基础 -> 调试 API
|
|
18
|
+
* │ │ ├── env.d.ts 基础 -> ENV
|
|
19
|
+
* │ │ ├── performance.d.ts
|
|
13
20
|
* │ │ ├── system.d.ts 基础 -> 系统 API
|
|
14
|
-
* │
|
|
15
|
-
* │
|
|
16
|
-
* │
|
|
17
|
-
* │
|
|
18
|
-
* │
|
|
19
|
-
* │ ├── canvas
|
|
21
|
+
* │ │ ├── update.d.ts 基础 -> 更新 API
|
|
22
|
+
* │ │ └── weapp 基础 -> 小程序 API
|
|
23
|
+
* │ │ ├── app-event.d.ts 基础 -> 小程序 API -> 应用级事件
|
|
24
|
+
* │ │ └── life-cycle.d.ts 基础 -> 小程序 API -> 生命周期
|
|
25
|
+
* │ ├── canvas
|
|
20
26
|
* │ │ └── index.d.ts 画布 API
|
|
21
|
-
* │
|
|
27
|
+
* │ ├── cloud
|
|
22
28
|
* │ │ └── index.d.ts 微信小程序云开发 API
|
|
23
|
-
* │
|
|
29
|
+
* │ ├── data-analysis
|
|
30
|
+
* │ │ └── index.d.ts 数据分析 API
|
|
31
|
+
* │ ├── device
|
|
24
32
|
* │ │ ├── accelerometer.d.ts 设备 -> 加速计 API
|
|
33
|
+
* │ │ ├── accessibility.d.ts 设备 -> 无障碍 API
|
|
25
34
|
* │ │ ├── battery.d.ts 设备 -> 电量 API
|
|
26
|
-
* │
|
|
27
|
-
* │
|
|
35
|
+
* │ │ ├── bluetooth-ble.d.ts 设备 -> 蓝牙-低功耗中心设备 API
|
|
36
|
+
* │ │ ├── bluetooth-peripheral.d.ts 设备 -> 蓝牙-低功耗外围设备 API
|
|
37
|
+
* │ │ ├── bluetooth.d.ts 设备 -> 蓝牙-通用 API
|
|
38
|
+
* │ │ ├── calendar.d.ts 设备 -> 日历 API
|
|
28
39
|
* │ │ ├── clipboard.d.ts 设备 -> 剪贴板 API
|
|
29
40
|
* │ │ ├── compass.d.ts 设备 -> 罗盘 API
|
|
30
41
|
* │ │ ├── contact.d.ts 设备 -> 联系人 API
|
|
31
|
-
* │ │ ├── motion.d.ts 设备 -> 设备方向 API
|
|
32
42
|
* │ │ ├── gyroscope.d.ts 设备 -> 陀螺仪 API
|
|
33
43
|
* │ │ ├── iBeacon.d.ts 设备 -> iBeacon API
|
|
34
|
-
* │
|
|
35
|
-
* │
|
|
36
|
-
* │ │ ├──
|
|
44
|
+
* │ │ ├── keyboard.d.ts 设备 -> 键盘 API
|
|
45
|
+
* │ │ ├── memory.d.ts 设备 -> 内存 API
|
|
46
|
+
* │ │ ├── motion.d.ts 设备 -> 设备方向 API
|
|
47
|
+
* │ │ ├── network.d.ts 设备 -> 网络 API
|
|
48
|
+
* │ │ ├── nfc.d.ts 设备 -> NFC 读写 API
|
|
37
49
|
* │ │ ├── phone.d.ts 设备 -> 电话 API
|
|
38
50
|
* │ │ ├── scan.d.ts 设备 -> 扫码 API
|
|
39
51
|
* │ │ ├── screen.d.ts 设备 -> 屏幕 API
|
|
52
|
+
* │ │ ├── sms.d.ts 设备 -> 短信 API
|
|
40
53
|
* │ │ ├── vibrate.d.ts 设备 -> 振动 API
|
|
41
54
|
* │ │ └── wifi.d.ts 设备 -> Wi-Fi API
|
|
42
|
-
* │
|
|
55
|
+
* │ ├── ext
|
|
43
56
|
* │ │ └── index.d.ts 第三方平台 API
|
|
44
|
-
* │
|
|
57
|
+
* │ ├── files
|
|
45
58
|
* │ │ └── index.d.ts 文件 API
|
|
46
|
-
* │
|
|
59
|
+
* │ ├── framework
|
|
47
60
|
* │ │ └── index.d.ts 小程序框架 API
|
|
48
|
-
* │
|
|
61
|
+
* │ ├── location
|
|
49
62
|
* │ │ └── index.d.ts 位置 API
|
|
50
|
-
* │
|
|
63
|
+
* │ ├── media
|
|
51
64
|
* │ │ ├── audio.d.ts 媒体 -> 音频 API
|
|
52
65
|
* │ │ ├── background-audio.d.ts 媒体 -> 背景音频 API
|
|
53
66
|
* │ │ ├── camera.d.ts 媒体 -> 相机 API
|
|
@@ -55,51 +68,72 @@
|
|
|
55
68
|
* │ │ ├── image.d.ts 媒体 -> 图片 API
|
|
56
69
|
* │ │ ├── live.d.ts 媒体 -> 实时音视频 API
|
|
57
70
|
* │ │ ├── map.d.ts 媒体 -> 地图 API
|
|
71
|
+
* │ │ ├── media-recorder.d.ts 媒体 -> 画面录制器 API
|
|
58
72
|
* │ │ ├── recorder.d.ts 媒体 -> 录音 API
|
|
59
|
-
* │
|
|
73
|
+
* │ │ ├── video-decoder.d.ts 媒体 -> 视频解码器 API
|
|
60
74
|
* │ │ └── video-processing.d.ts 媒体 -> 音视频合成 API
|
|
61
|
-
* │ ├──
|
|
75
|
+
* │ │ ├── video.d.ts 媒体 -> 视频 API
|
|
76
|
+
* │ │ └── voip.d.ts 媒体 -> 实时语音 API
|
|
77
|
+
* │ ├── navigate
|
|
78
|
+
* │ │ └── index.d.ts 跳转 API
|
|
79
|
+
* │ ├── network
|
|
62
80
|
* │ │ ├── download.d.ts 网络 -> 下载 API
|
|
63
81
|
* │ │ ├── mdns.d.ts 网络 -> mDNS API
|
|
64
82
|
* │ │ ├── request.d.ts 网络 -> 发起请求 API
|
|
83
|
+
* │ │ ├── tcp.d.ts 网络 -> TCP 通信 API
|
|
65
84
|
* │ │ ├── udp.d.ts 网络 -> UDP 通信 API
|
|
66
85
|
* │ │ ├── upload.d.ts 网络 -> 上传 API
|
|
67
86
|
* │ │ └── websocket.d.ts 网络 -> WebSocket API
|
|
68
|
-
* │
|
|
87
|
+
* │ ├── open-api
|
|
69
88
|
* │ │ ├── account.d.ts 开放接口 -> 账号信息 API
|
|
70
89
|
* │ │ ├── address.d.ts 开放接口 -> 收货地址 API
|
|
71
90
|
* │ │ ├── authorize.d.ts 开放接口 -> 授权 API
|
|
72
91
|
* │ │ ├── card.d.ts 开放接口 -> 卡券 API
|
|
73
|
-
*
|
|
92
|
+
* | | ├── channels.d.ts 开放接口 -> 视频号 API
|
|
93
|
+
* | | ├── customer-service.d.ts 开放接口 -> 微信客服 API
|
|
94
|
+
* | | ├── device-voip.d.ts 开放接口 -> 音视频通话 API
|
|
74
95
|
* │ │ ├── facial.d.ts 开放接口 -> 人脸识别 API // 在微信小程序文档已找不到
|
|
96
|
+
* │ │ ├── favorites.d.ts 开放接口 -> 收藏 API
|
|
97
|
+
* │ │ ├── group.d.ts 开放接口 -> 微信群 API
|
|
75
98
|
* │ │ ├── invoice.d.ts 开放接口 -> 发票 API
|
|
99
|
+
* │ │ ├── license-plate.d.ts 开放接口 -> 车牌 API
|
|
76
100
|
* │ │ ├── login.d.ts 开放接口 -> 登录 API
|
|
77
|
-
* │ │ ├──
|
|
78
|
-
* │ │ ├──
|
|
79
|
-
* │ │ ├──
|
|
101
|
+
* │ │ ├── my-miniprogram.d.ts 开放接口 -> 我的小程序 API
|
|
102
|
+
* │ │ ├── privacy.d.ts 开放接口 -> 隐私信息授权 API
|
|
103
|
+
* │ │ ├── redpackage.d.ts 开放接口 -> 微信红包 API
|
|
80
104
|
* │ │ ├── settings.d.ts 开放接口 -> 设置 API
|
|
81
105
|
* │ │ ├── soter.d.ts 开放接口 -> 生物认证 API
|
|
106
|
+
* │ │ ├── sticker.d.ts 开放接口 -> 微信表情 API
|
|
82
107
|
* | | ├── subscribe-message.d.ts 开放接口 -> 订阅消息 API
|
|
83
108
|
* │ │ ├── user-info.d.ts 开放接口 -> 用户信息 API
|
|
84
|
-
* │ │ ├── customer-service.d.ts 开放接口 -> 微信客服 API
|
|
85
109
|
* │ │ └── werun.d.ts 开放接口 -> 微信运动 API
|
|
86
|
-
* │
|
|
110
|
+
* │ ├── payment
|
|
111
|
+
* │ │ └── index.d.ts 支付 API
|
|
112
|
+
* │ ├── qq
|
|
113
|
+
* │ │ └── index.d.ts QQ 小程序 API
|
|
114
|
+
* │ ├── route
|
|
87
115
|
* │ │ └── index.d.ts 路由 API
|
|
88
|
-
* │
|
|
116
|
+
* │ ├── share
|
|
89
117
|
* │ │ └── index.d.ts 转发 API
|
|
90
|
-
* │
|
|
118
|
+
* │ ├── skyline
|
|
91
119
|
* │ │ └── index.d.ts 微信 Skyline API
|
|
92
|
-
* │
|
|
120
|
+
* │ ├── storage
|
|
93
121
|
* │ │ ├── background-fetch.d.ts 数据缓存 -> 后台获取 API
|
|
94
|
-
* │
|
|
95
|
-
* │
|
|
122
|
+
* │ │ ├── cache-manager.d.ts 数据缓存 -> 缓存管理 API
|
|
123
|
+
* │ │ └── index.d.ts 数据缓存 API
|
|
124
|
+
* │ ├── swan
|
|
125
|
+
* │ │ ├── bookshelf.d.ts 百度小程序 -> 书架 API
|
|
126
|
+
* │ │ ├── download-package.d.ts 百度小程序 -> 下载包 API
|
|
96
127
|
* │ │ └── index.d.ts 百度小程序 API
|
|
97
|
-
* │
|
|
128
|
+
* │ │ └── pay.d.ts 百度小程序 -> 支付 API
|
|
129
|
+
* │ ├── taro.extend.d.ts Taro 扩展 API 类型定义
|
|
130
|
+
* │ ├── taro.hooks.d.ts Taro Hooks 类型定义
|
|
131
|
+
* │ ├── ui
|
|
98
132
|
* │ │ ├── animation.d.ts 界面 -> 动画 API
|
|
99
133
|
* │ │ ├── background.d.ts 界面 -> 背景 API
|
|
100
134
|
* │ │ ├── custom-component.d.ts 界面 -> 自定义组件 API
|
|
101
135
|
* │ │ ├── fonts.d.ts 界面 -> 字体 API
|
|
102
|
-
* │
|
|
136
|
+
* │ │ ├── interaction.d.ts 界面 -> 交互 API
|
|
103
137
|
* │ │ ├── menu.d.ts 界面 -> 菜单 API
|
|
104
138
|
* │ │ ├── navigation-bar.d.ts 界面 -> 导航栏 API
|
|
105
139
|
* │ │ ├── pull-down-refresh.d.ts 界面 -> 下拉刷新 API
|
|
@@ -107,14 +141,25 @@
|
|
|
107
141
|
* │ │ ├── sticky.d.ts 界面 -> 置顶 API
|
|
108
142
|
* │ │ ├── tab-bar.d.ts 界面 -> TabBar API
|
|
109
143
|
* │ │ ├── window.d.ts 界面 -> 窗口 API
|
|
110
|
-
* │
|
|
111
|
-
* │ ├── worker
|
|
144
|
+
* │ ├── worker
|
|
112
145
|
* │ │ └── index.d.ts Worker API
|
|
113
|
-
* │
|
|
146
|
+
* │ └── wxml
|
|
114
147
|
* │ │ └── index.d.ts WXML API
|
|
115
|
-
*
|
|
116
|
-
* │
|
|
148
|
+
* ├── compile
|
|
149
|
+
* │ ├── compiler.d.ts
|
|
150
|
+
* │ ├── config
|
|
151
|
+
* │ │ ├── h5.d.ts
|
|
152
|
+
* │ │ ├── index.d.ts
|
|
153
|
+
* │ │ ├── manifest.d.ts
|
|
154
|
+
* │ │ ├── mini.d.ts
|
|
155
|
+
* │ │ ├── project.d.ts
|
|
156
|
+
* │ │ ├── rn.d.ts
|
|
157
|
+
* │ │ └── util.d.ts
|
|
158
|
+
* │ ├── hooks.d.ts Taro Hooks 类型定义
|
|
159
|
+
* │ └── index.d.ts
|
|
160
|
+
* ├── global.d.ts
|
|
117
161
|
* ├── index.d.ts 此文件
|
|
162
|
+
* ├── taro.api.d.ts
|
|
118
163
|
* ├── taro.component.d.ts Taro Component 类型定义
|
|
119
164
|
* ├── taro.config.d.ts Taro 小程序 App 与 Window 设置类型定义
|
|
120
165
|
* └── taro.lifecycle.d.ts Taro 生命周期类型定义
|
|
@@ -126,6 +171,7 @@
|
|
|
126
171
|
/// <reference path="taro.component.d.ts" />
|
|
127
172
|
/// <reference path="taro.config.d.ts" />
|
|
128
173
|
/// <reference path="taro.lifecycle.d.ts" />
|
|
174
|
+
/// <reference path="taro.runtime.d.ts" />
|
|
129
175
|
|
|
130
176
|
/// <reference types="@tarojs/plugin-platform-alipay/types/shims-alipay" />
|
|
131
177
|
/// <reference types="@tarojs/plugin-platform-jd/types/shims-jd" />
|
|
@@ -141,10 +187,9 @@ export as namespace Taro
|
|
|
141
187
|
declare const Taro: Taro.TaroStatic
|
|
142
188
|
|
|
143
189
|
declare namespace Taro {
|
|
144
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
145
190
|
interface TaroStatic {}
|
|
146
191
|
}
|
|
147
192
|
declare global {
|
|
148
|
-
const defineAppConfig: (config: Taro.
|
|
149
|
-
const definePageConfig: (config: Taro.
|
|
193
|
+
const defineAppConfig: (config: Taro.AppConfig) => Taro.AppConfig
|
|
194
|
+
const definePageConfig: (config: Taro.PageConfig) => Taro.Config
|
|
150
195
|
}
|
package/types/taro.api.d.ts
CHANGED
|
@@ -59,26 +59,30 @@
|
|
|
59
59
|
/// <reference path="api/media/video-decoder.d.ts" />
|
|
60
60
|
/// <reference path="api/location/index.d.ts" />
|
|
61
61
|
/// <reference path="api/files/index.d.ts" />
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
/// <reference path="api/open-api/account.d.ts" />
|
|
64
|
-
/// <reference path="api/open-api/user-info.d.ts" />
|
|
65
|
-
/// <reference path="api/open-api/authorize.d.ts" />
|
|
66
|
-
/// <reference path="api/open-api/settings.d.ts" />
|
|
67
64
|
/// <reference path="api/open-api/address.d.ts" />
|
|
65
|
+
/// <reference path="api/open-api/authorize.d.ts" />
|
|
68
66
|
/// <reference path="api/open-api/card.d.ts" />
|
|
69
|
-
/// <reference path="api/open-api/invoice.d.ts" />
|
|
70
|
-
/// <reference path="api/open-api/soter.d.ts" />
|
|
71
|
-
/// <reference path="api/open-api/werun.d.ts" />
|
|
72
|
-
/// <reference path="api/open-api/subscribe-message.d.ts" />
|
|
73
|
-
/// <reference path="api/open-api/redpackage.d.ts" />
|
|
74
|
-
/// <reference path="api/open-api/favorites.d.ts" />
|
|
75
|
-
/// <reference path="api/open-api/my-miniprogram.d.ts" />
|
|
76
|
-
/// <reference path="api/open-api/license-plate.d.ts" />
|
|
77
67
|
/// <reference path="api/open-api/channels.d.ts" />
|
|
68
|
+
/// <reference path="api/open-api/customer-service.d.ts" />
|
|
78
69
|
/// <reference path="api/open-api/device-voip.d.ts" />
|
|
70
|
+
/// <reference path="api/open-api/facial.d.ts" />
|
|
71
|
+
/// <reference path="api/open-api/favorites.d.ts" />
|
|
79
72
|
/// <reference path="api/open-api/group.d.ts" />
|
|
73
|
+
/// <reference path="api/open-api/invoice.d.ts" />
|
|
74
|
+
/// <reference path="api/open-api/license-plate.d.ts" />
|
|
75
|
+
/// <reference path="api/open-api/login.d.ts" />
|
|
76
|
+
/// <reference path="api/open-api/my-miniprogram.d.ts" />
|
|
80
77
|
/// <reference path="api/open-api/privacy.d.ts" />
|
|
81
|
-
/// <reference path="api/open-api/
|
|
78
|
+
/// <reference path="api/open-api/redpackage.d.ts" />
|
|
79
|
+
/// <reference path="api/open-api/settings.d.ts" />
|
|
80
|
+
/// <reference path="api/open-api/soter.d.ts" />
|
|
81
|
+
/// <reference path="api/open-api/sticker.d.ts" />
|
|
82
|
+
/// <reference path="api/open-api/subscribe-message.d.ts" />
|
|
83
|
+
/// <reference path="api/open-api/user-info.d.ts" />
|
|
84
|
+
/// <reference path="api/open-api/werun.d.ts" />
|
|
85
|
+
|
|
82
86
|
/// <reference path="api/device/bluetooth.d.ts" />
|
|
83
87
|
/// <reference path="api/device/bluetooth-ble.d.ts" />
|
|
84
88
|
/// <reference path="api/device/bluetooth-peripheral.d.ts" />
|
|
@@ -112,11 +116,15 @@
|
|
|
112
116
|
/// <reference path="api/skyline/index.d.ts" />
|
|
113
117
|
|
|
114
118
|
/// <reference path="api/cloud/index.d.ts" />
|
|
115
|
-
/// <reference path="api/open-api/facial.d.ts" />
|
|
116
119
|
|
|
117
120
|
/// <reference path="api/alipay/index.d.ts" />
|
|
118
121
|
/// <reference path="api/qq/index.d.ts" />
|
|
122
|
+
|
|
123
|
+
/// <reference path="api/swan/bookshelf.d.ts" />
|
|
124
|
+
/// <reference path="api/swan/download-package.d.ts" />
|
|
119
125
|
/// <reference path="api/swan/index.d.ts" />
|
|
126
|
+
/// <reference path="api/swan/pay.d.ts" />
|
|
127
|
+
|
|
120
128
|
|
|
121
129
|
/// <reference path="api/taro.extend.d.ts" />
|
|
122
130
|
/// <reference path="api/taro.hooks.d.ts" />
|
|
@@ -19,6 +19,7 @@ declare module './index' {
|
|
|
19
19
|
shareTicket: string | undefined
|
|
20
20
|
scene: number | undefined
|
|
21
21
|
exitState?: any
|
|
22
|
+
$taroPath?: string
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
interface Show {
|
|
@@ -139,5 +140,7 @@ declare module './index' {
|
|
|
139
140
|
path?: string
|
|
140
141
|
/** 页面的组件选项 */
|
|
141
142
|
options?: Record<string, unknown>
|
|
143
|
+
/** 获得一个 EventChannel 对象,用于页面间通讯 */
|
|
144
|
+
getOpenerEventChannel?(): Record<string, any>
|
|
142
145
|
}
|
|
143
146
|
}
|
package/types/taro.config.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ declare module './index' {
|
|
|
10
10
|
*/
|
|
11
11
|
navigationBarBackgroundColor?: string
|
|
12
12
|
/** 导航栏标题颜色,仅支持 black/white
|
|
13
|
+
* 当 app.json 中配置 darkmode 为 true 时可通过变量的形式配置
|
|
14
|
+
* @see: https://developers.weixin.qq.com/miniprogram/dev/framework/ability/darkmode.html
|
|
13
15
|
* @default: "white"
|
|
14
16
|
*/
|
|
15
|
-
navigationBarTextStyle?: 'white' | 'black'
|
|
17
|
+
navigationBarTextStyle?: 'white' | 'black' | string
|
|
16
18
|
/** 导航栏标题文字内容 */
|
|
17
19
|
navigationBarTitleText?: string
|
|
18
20
|
/** 导航栏样式,仅支持以下值:
|
|
@@ -30,10 +32,17 @@ declare module './index' {
|
|
|
30
32
|
* @default: "#ffffff"
|
|
31
33
|
*/
|
|
32
34
|
backgroundColor?: string
|
|
35
|
+
/** 页面容器背景色, HexColor
|
|
36
|
+
* @see: https://developers.weixin.qq.com/miniprogram/dev/framework/runtime/skyline/custom-route.html#%E8%AE%BE%E7%BD%AE%E9%A1%B5%E9%9D%A2%E9%80%8F%E6%98%8E
|
|
37
|
+
* @default: "#ffffff"
|
|
38
|
+
*/
|
|
39
|
+
backgroundColorContent?: string
|
|
33
40
|
/** 下拉背景字体、loading 图的样式,仅支持 dark/light
|
|
41
|
+
* 当 app.json 中配置 darkmode 为 true 时可通过变量的形式配置
|
|
42
|
+
* @see: https://developers.weixin.qq.com/miniprogram/dev/framework/ability/darkmode.html
|
|
34
43
|
* @default: "dark"
|
|
35
44
|
*/
|
|
36
|
-
backgroundTextStyle?: 'dark' | 'light'
|
|
45
|
+
backgroundTextStyle?: 'dark' | 'light' | string
|
|
37
46
|
/** 顶部窗口的背景色,仅 iOS 支持
|
|
38
47
|
* @default: "#ffffff"
|
|
39
48
|
*/
|
|
@@ -420,7 +429,7 @@ declare module './index' {
|
|
|
420
429
|
decodeQuery?: 'disable'
|
|
421
430
|
}
|
|
422
431
|
|
|
423
|
-
interface AppConfig {
|
|
432
|
+
export interface AppConfig {
|
|
424
433
|
/** 小程序默认启动首页,未指定 entryPagePath 时,数组的第一项代表小程序的初始页面(首页)。 */
|
|
425
434
|
entryPagePath?: string
|
|
426
435
|
/** 接受一个数组,每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序的初始页面 */
|
|
@@ -557,7 +566,7 @@ declare module './index' {
|
|
|
557
566
|
*/
|
|
558
567
|
themeLocation?: string
|
|
559
568
|
/** 配置自定义组件代码按需注入 */
|
|
560
|
-
lazyCodeLoading?: string
|
|
569
|
+
lazyCodeLoading?: 'requiredComponents' | string
|
|
561
570
|
/** 单页模式相关配置 */
|
|
562
571
|
singlePage?: SinglePage
|
|
563
572
|
/** 聊天素材小程序打开相关配置
|