Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type): add getAccountInfoSync miniProgram type #6605

Merged
merged 2 commits into from
Jun 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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