From 7d052bff6fd221b4695827d3aa0fd7edff87417c Mon Sep 17 00:00:00 2001 From: wendel Date: Fri, 8 Aug 2025 17:42:07 +0800 Subject: [PATCH] handler Signed-off-by: wendel Change-Id: I16b9a65d445502b85ed9795830cd9a9643f3ce8c --- api/@ohos.app.ability.CompletionHandler.d.ts | 4 +++- api/@ohos.app.ability.OpenLinkOptions.d.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/api/@ohos.app.ability.CompletionHandler.d.ts b/api/@ohos.app.ability.CompletionHandler.d.ts index 835510b073..caab1c2b10 100644 --- a/api/@ohos.app.ability.CompletionHandler.d.ts +++ b/api/@ohos.app.ability.CompletionHandler.d.ts @@ -45,7 +45,9 @@ export default class CompletionHandler { * Notify the failure result of startAbility. * * @param { ElementName } elementName - Indicates the component to start. - * @param { string } message - Indicates the message of the request result. + * Returns an empty value if the target application cannot be found. + * @param { string } message - The message is a JSON string. + * The key represents the failureCode, and the value represents the detailed description of the failureCode. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice diff --git a/api/@ohos.app.ability.OpenLinkOptions.d.ts b/api/@ohos.app.ability.OpenLinkOptions.d.ts index 63873b4f2c..337b7d04f7 100644 --- a/api/@ohos.app.ability.OpenLinkOptions.d.ts +++ b/api/@ohos.app.ability.OpenLinkOptions.d.ts @@ -18,6 +18,8 @@ * @kit AbilityKit */ +import CompletionHandler from './@ohos.app.ability.CompletionHandler'; + /** * Define the available options for openLink API. * @@ -53,4 +55,16 @@ export default interface OpenLinkOptions { * @arkts 1.1&1.2 */ parameters?: Record; + + /** + * The completion handler of openLink. + * + * @type { ?CompletionHandler } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + completionHandler?: CompletionHandler; } -- Gitee