From c5e9d4ba51af9adeb18eb7fb5bacb2b4f73f2725 Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Sat, 21 Jun 2025 17:39:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=83=E8=83=BD=E5=8A=9B=E5=BC=80=E6=94=BEAb?= =?UTF-8?q?ilityStartCallback=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E5=88=B0?= =?UTF-8?q?1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzezhong --- api/application/AbilityStartCallback.d.ts | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/api/application/AbilityStartCallback.d.ts b/api/application/AbilityStartCallback.d.ts index b307905ed1..5e9ca4d75b 100644 --- a/api/application/AbilityStartCallback.d.ts +++ b/api/application/AbilityStartCallback.d.ts @@ -18,19 +18,22 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ import type { AbilityResult } from '../ability/abilityResult'; +/*** if arkts 1.1 */ +import { int } from '../@ohos.base'; /*** endif */ /** * The callback of UIAbility or UIExtensionAbility. + * + * @typedef AbilityStartCallback * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ -declare class AbilityStartCallback { +declare interface AbilityStartCallback { /** * Called when some error occurred except disconnected from UIAbility or UIExtensionAbility. @@ -41,9 +44,10 @@ declare class AbilityStartCallback { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - onError(code: number, name: string, message: string): void; + onError(code: int, name: string, message: string): void; /** * Called when UIExtensionAbility terminate with result. @@ -55,6 +59,18 @@ declare class AbilityStartCallback { * @since 12 */ onResult?(parameter: AbilityResult): void; + + /** + * Called when UIExtensionAbility terminate with result. + * + * @param { AbilityResult } parameter - The parameter returned if the UIExtensionAbility call terminateSelfWithResult. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onResult?:(parameter: AbilityResult)=> void; } export default AbilityStartCallback; \ No newline at end of file -- Gitee