未验证 提交 cccd3510 编写于 作者: 1 189******51 提交者: Gitee

IssueNo: #I7UZUJ:[新需求]: Rectify the arkts syntax

Description: Rectify the arkts syntax
Sig: SIG_ApplicaitonFramework
Feature or Bugfix: Feature
Binary Source: No
Signed-off-by: N189******51 <lipeicheng5@huawei.com>
上级 c47e74e4
......@@ -105,11 +105,13 @@ getLauncherAbilityInfo(bundleName: string, userId: number) : Promise<Array\<[Lau
```typescript
import launcherBundleManager from '@ohos.bundle.launcherBundleManager';
import { BusinessError } from '@ohos.base';
try {
launcherBundleManager.getLauncherAbilityInfo("com.example.demo", 100).then(data => {
launcherBundleManager.getLauncherAbilityInfo("com.example.demo", 100)
.then((data: launcherBundleManager.LauncherAbilityInfo[]) => {
console.log("data is " + JSON.stringify(data));
}).catch (errData => {
}).catch ((errData: BusinessError) => {
console.error(`errData is errCode:${errData.code} message:${errData.message}`);
})
} catch (errData) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册