Skip to content

Commit

Permalink
fix(type): add getAccountInfoSync miniProgram type (#6605)
Browse files Browse the repository at this point in the history
Co-authored-by: chenjiajian <798095202@qq.com>
  • Loading branch information
cncolder and Chen-jj authored Jun 9, 2020
1 parent f744b9d commit 6d1f9a0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/taro/types/api/open-api/account.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ declare namespace Taro {
interface MiniProgram {
/** 小程序 appId */
appId: string
/**
* 小程序版本
* @since 2.10.0
*/
envVersion: 'develop' | 'trial' | 'release'
/**
* 线上小程序版本号
* @since 2.10.2
*/
version: string
}
/** 插件帐号信息(仅在插件中调用时包含这一项) */
interface Plugin {
Expand All @@ -26,7 +36,7 @@ declare namespace Taro {
* @example
* ```tsx
* const accountInfo = Taro.getAccountInfoSync();
*
*
* console.log(accountInfo.miniProgram.appId) // 小程序 appId
* console.log(accountInfo.plugin.appId) // 插件 appId
* console.log(accountInfo.plugin.version) // 插件版本号, 'a.b.c' 这样的形式
Expand Down

0 comments on commit 6d1f9a0

Please sign in to comment.