@tarojs/taro 3.7.0-alpha.2 → 3.7.0-alpha.4
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 +9 -3
- package/types/api/ai/inference.d.ts +133 -0
- package/types/api/base/crypto.d.ts +17 -3
- package/types/api/base/index.d.ts +2 -2
- package/types/api/base/performance.d.ts +63 -0
- package/types/api/base/system.d.ts +65 -0
- package/types/api/base/weapp/app-event.d.ts +18 -18
- package/types/api/device/calendar.d.ts +2 -2
- package/types/api/device/screen.d.ts +61 -0
- package/types/api/device/sms.d.ts +26 -0
- package/types/api/media/image.d.ts +40 -17
- package/types/api/media/live.d.ts +52 -0
- package/types/api/media/video.d.ts +64 -23
- package/types/api/media/voip.d.ts +103 -0
- package/types/api/network/request.d.ts +18 -15
- package/types/api/open-api/channels.d.ts +31 -0
- package/types/api/open-api/device-voip.d.ts +63 -0
- package/types/api/storage/cache-manager.d.ts +198 -0
- package/types/api/taro.extend.d.ts +200 -0
- package/types/{taro.hooks.d.ts → api/taro.hooks.d.ts} +4 -4
- package/types/compile/compiler.d.ts +1 -1
- package/types/compile/config/h5.d.ts +63 -2
- package/types/compile/config/mini.d.ts +43 -4
- package/types/compile/config/project.d.ts +226 -10
- package/types/compile/config/rn.d.ts +56 -0
- package/types/compile/config/util.d.ts +62 -4
- package/types/global.d.ts +8 -8
- package/types/index.d.ts +7 -7
- package/types/taro.api.d.ts +8 -1
- package/types/taro.component.d.ts +2 -1
- package/types/taro.config.d.ts +8 -1
- package/types/taro.extend.d.ts +0 -112
package/types/taro.extend.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import Taro from './index'
|
|
4
|
-
|
|
5
|
-
declare module './index' {
|
|
6
|
-
type MessageType = 'info' | 'success' | 'error' | 'warning'
|
|
7
|
-
|
|
8
|
-
interface AtMessageOptions {
|
|
9
|
-
message: string
|
|
10
|
-
type?: MessageType
|
|
11
|
-
duration?: number
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface RequestParams<T=any> extends request.Option<T, any> {
|
|
15
|
-
[propName: string]: any
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface Current {
|
|
19
|
-
app: AppInstance | null
|
|
20
|
-
router: RouterInfo | null
|
|
21
|
-
page: PageInstance | null
|
|
22
|
-
onReady: string
|
|
23
|
-
onHide: string
|
|
24
|
-
onShow: string
|
|
25
|
-
preloadData?: Record<any, any>
|
|
26
|
-
/**
|
|
27
|
-
* RN 私有对象navigationRef,用于使用底层接口控制路由
|
|
28
|
-
*/
|
|
29
|
-
rnNavigationRef?: React.RefObject<any>
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface SetGlobalDataPlugin {
|
|
33
|
-
install (app: any, data: any): void
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
interface TARO_ENV_TYPE {
|
|
37
|
-
[TaroGeneral.ENV_TYPE.WEAPP]: TaroGeneral.ENV_TYPE.WEAPP
|
|
38
|
-
[TaroGeneral.ENV_TYPE.WEB]: TaroGeneral.ENV_TYPE.WEB
|
|
39
|
-
[TaroGeneral.ENV_TYPE.RN]: TaroGeneral.ENV_TYPE.RN
|
|
40
|
-
[TaroGeneral.ENV_TYPE.SWAN]: TaroGeneral.ENV_TYPE.SWAN
|
|
41
|
-
[TaroGeneral.ENV_TYPE.ALIPAY]: TaroGeneral.ENV_TYPE.ALIPAY
|
|
42
|
-
[TaroGeneral.ENV_TYPE.TT]: TaroGeneral.ENV_TYPE.TT
|
|
43
|
-
[TaroGeneral.ENV_TYPE.QQ]: TaroGeneral.ENV_TYPE.QQ
|
|
44
|
-
[TaroGeneral.ENV_TYPE.JD]: TaroGeneral.ENV_TYPE.JD
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface TaroStatic {
|
|
48
|
-
Events: {
|
|
49
|
-
new (): TaroGeneral.Events
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** 事件中心
|
|
53
|
-
* @supported global
|
|
54
|
-
*/
|
|
55
|
-
eventCenter: TaroGeneral.Events
|
|
56
|
-
|
|
57
|
-
ENV_TYPE: TARO_ENV_TYPE
|
|
58
|
-
|
|
59
|
-
/** 获取环境变量
|
|
60
|
-
* @supported global
|
|
61
|
-
*/
|
|
62
|
-
getEnv(): TaroGeneral.ENV_TYPE
|
|
63
|
-
|
|
64
|
-
/** 尺寸转换
|
|
65
|
-
* @supported global
|
|
66
|
-
*/
|
|
67
|
-
pxTransform(size: number, designWidth?: number): string
|
|
68
|
-
|
|
69
|
-
/** 尺寸转换初始化
|
|
70
|
-
* @supported global
|
|
71
|
-
*/
|
|
72
|
-
initPxTransform(config: {
|
|
73
|
-
baseFontSize?: number
|
|
74
|
-
deviceRatio?: TaroGeneral.TDeviceRatio
|
|
75
|
-
designWidth?: number
|
|
76
|
-
targetUnit?: string
|
|
77
|
-
unitPrecision?: number
|
|
78
|
-
}): void
|
|
79
|
-
|
|
80
|
-
/** 小程序引用插件 JS 接口
|
|
81
|
-
* @supported weapp, alipay, h5, rn, jd, qq, swan, tt, quickapp
|
|
82
|
-
*/
|
|
83
|
-
requirePlugin(pluginName: string): any
|
|
84
|
-
|
|
85
|
-
/** 获取当前页面实例
|
|
86
|
-
* @supported global
|
|
87
|
-
*/
|
|
88
|
-
getCurrentInstance(): Current
|
|
89
|
-
Current: Current
|
|
90
|
-
|
|
91
|
-
/** Vue3 插件,用于设置 `getApp()` 中的全局变量
|
|
92
|
-
* @supported weapp, alipay, h5, rn, jd, qq, swan, tt, quickapp
|
|
93
|
-
* @example
|
|
94
|
-
* ```js
|
|
95
|
-
* // 使用插件
|
|
96
|
-
* const App = createApp(...)
|
|
97
|
-
* App.use(setGlobalDataPlugin, {
|
|
98
|
-
* xxx: 999
|
|
99
|
-
* })
|
|
100
|
-
* // 获取全局变量
|
|
101
|
-
* Taro.getApp().xxx
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
setGlobalDataPlugin: SetGlobalDataPlugin
|
|
105
|
-
|
|
106
|
-
/** 获取自定义 TabBar 对应的 React 或 Vue 组件实例
|
|
107
|
-
* @supported weapp
|
|
108
|
-
* @param page 小程序页面对象,可以通过 Taro.getCurrentInstance().page 获取
|
|
109
|
-
*/
|
|
110
|
-
getTabBar<T>(page: Current['page']): T | undefined
|
|
111
|
-
}
|
|
112
|
-
}
|