@tarojs/taro 3.6.6-alpha.0 → 3.6.6-alpha.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.6.6-alpha.0",
3
+ "version": "3.6.6-alpha.1",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -21,8 +21,8 @@
21
21
  "author": "O2Team",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@tarojs/api": "3.6.6-alpha.0",
25
- "@tarojs/runtime": "3.6.6-alpha.0"
24
+ "@tarojs/api": "3.6.6-alpha.1",
25
+ "@tarojs/runtime": "3.6.6-alpha.1"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@types/react": {
@@ -26,7 +26,7 @@ declare module '../../index' {
26
26
  * @supported weapp
27
27
  * @example
28
28
  * ```tsx
29
- * Taro.getRandomValues({
29
+ * Taro.getUserCryptoManager().getRandomValues({
30
30
  * length: 6 // 生成 6 个字节长度的随机数,
31
31
  * success: res => {
32
32
  * console.log(Taro.arrayBufferToBase64(res.randomValues)) // 转换为 base64 字符串后打印
@@ -35,7 +35,7 @@ declare module '../../index' {
35
35
  * ```
36
36
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/crypto/UserCryptoManager.getRandomValues.html
37
37
  */
38
- getRandomValues(option: UserCryptoManager.getRandomValues.Option): Promise<UserCryptoManager.getRandomValues.SuccessCallbackResult>
38
+ getRandomValues(option: UserCryptoManager.getRandomValues.Option): void
39
39
  }
40
40
 
41
41
  namespace UserCryptoManager {
@@ -66,7 +66,7 @@ declare module '../../index' {
66
66
  /** 整数,生成随机数的字节数,最大 1048576 */
67
67
  length: number
68
68
  /** 接口调用成功的回调函数 */
69
- success?: (res: TaroGeneral.CallbackResult) => void
69
+ success?: (res: SuccessCallbackResult) => void
70
70
  /** 接口调用失败的回调函数 */
71
71
  fail?: (res: TaroGeneral.CallbackResult) => void
72
72
  /** 接口调用结束的回调函数(调用成功、失败都会执行) */
@@ -86,5 +86,19 @@ declare module '../../index' {
86
86
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/crypto/wx.getUserCryptoManager.html
87
87
  */
88
88
  getUserCryptoManager(): UserCryptoManager
89
+
90
+ /** 获取密码学安全随机数
91
+ * @supported weapp
92
+ * @example
93
+ * ```tsx
94
+ * Taro.getRandomValues({
95
+ * length: 6 // 生成 6 个字节长度的随机数
96
+ * }).then(res => {
97
+ * console.log(Taro.arrayBufferToBase64(res.randomValues)) // 转换为 base64 字符串后打印
98
+ * })
99
+ * ```
100
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/base/crypto/UserCryptoManager.getRandomValues.html
101
+ */
102
+ getRandomValues(option: UserCryptoManager.getRandomValues.Option): Promise<UserCryptoManager.getRandomValues.SuccessCallbackResult>
89
103
  }
90
104
  }
@@ -83,8 +83,12 @@ declare module './index' {
83
83
  unitPrecision?: number
84
84
  }): void
85
85
 
86
+ /** @ignore */
86
87
  initAppInfo(appInfo: AppInfo): void
87
88
 
89
+ /** 小程序获取和 Taro 相关的 App 信息
90
+ * @supported weapp, alipay, jd, qq, swan, tt
91
+ */
88
92
  getAppInfo(): AppInfo
89
93
 
90
94
  /** 小程序引用插件 JS 接口