diff --git a/api/@ohos.app.ability.autoFillManager.d.ts b/api/@ohos.app.ability.autoFillManager.d.ts index 08abf86c63c1d6f251cd97462aa259f9efa24e00..59c3caf071ad56836d558dd7b83a99519a66de41 100644 --- a/api/@ohos.app.ability.autoFillManager.d.ts +++ b/api/@ohos.app.ability.autoFillManager.d.ts @@ -52,6 +52,30 @@ import { UIContext } from './@ohos.arkui.UIContext'; * @arkts 1.1&1.2 */ declare namespace autoFillManager { + /** + * Called when auto save request is successfully handled. + * + * @typedef { function } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @atomicservice + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type OnSuccessFn = () => void; + + /** + * Called when auto save request is failed to be handled. + * + * @typedef { function } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @atomicservice + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type OnFailureFn = () => void; + /** * Auto save callback. * @@ -81,13 +105,14 @@ declare namespace autoFillManager { /** * Called when auto save request is successfully handled. * + * @type { OnSuccessFn } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - onSuccess(): void; + onSuccess: OnSuccessFn; /** * Called when auto save request is failed to be handled. @@ -99,13 +124,14 @@ declare namespace autoFillManager { /** * Called when auto save request is failed to be handled. * + * @type { OnFailureFn } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - onFailure(): void; + onFailure: OnFailureFn; } /** diff --git a/api/@ohos.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts index ea86d1c15bdffb3c8d6cba4fe063a05a8d754121..ebd8837d3ff1e5422ef584cfac24be8cf8e809b0 100644 --- a/api/@ohos.application.testRunner.d.ts +++ b/api/@ohos.application.testRunner.d.ts @@ -18,6 +18,28 @@ * @kit TestKit */ +/** + * Prepare the unit testing environment for running test cases. + * + * @typedef { Function } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnPrepareFn = () => void; + +/** + * Run all test cases. + * + * @typedef { Function } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnRunFn = () => void; + /** * Base class for the test framework. * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. @@ -45,13 +67,14 @@ interface TestRunner { */ /** * Prepare the unit testing environment for running test cases. - * + * + * @type { OnPrepareFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onPrepare(): void; + onPrepare: OnPrepareFn; /** * Run all test cases. @@ -62,12 +85,13 @@ interface TestRunner { /** * Run all test cases. * + * @typedef { OnRunFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onRun(): void; + onRun: OnRunFn; } /*** if arkts 1.1 */ diff --git a/api/ability/connectOptions.d.ts b/api/ability/connectOptions.d.ts index ba55aa9e5dd74b7d6e5545c3d6f18fb24ab8c6f8..6206ab6a25160c33fae4c849f78a7ae3d00bbc3e 100644 --- a/api/ability/connectOptions.d.ts +++ b/api/ability/connectOptions.d.ts @@ -21,6 +21,40 @@ import { ElementName } from '../bundleManager/ElementName'; import rpc from './../@ohos.rpc'; +/** + * The callback interface was connect successfully. + * + * @typedef { Function } + * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability + * @param { rpc.IRemoteObject } remote - The remote object instance + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnConnectFn = (elementName: ElementName, remote: rpc.IRemoteObject) => void; + +/** + * The callback interface was disconnect successfully. + * + * typedef { Function } + * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnDisconnectFn = (elementName: ElementName) => void; + +/** + * The callback interface was connect failed. + * + * @typedef { Function } + * @param { int } code - The error code of the failed. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnFailedFn = (code: int) => void; + /** * As an input parameter when connecting a specified background service, it is used to receive * state changes during the connection. @@ -42,13 +76,12 @@ export interface ConnectOptions { /** * The callback interface was connect successfully. * - * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability - * @param { rpc.IRemoteObject } remote - The remote object instance + * @type { OnConnectFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - onConnect(elementName: ElementName, remote: rpc.IRemoteObject): void; + onConnect: OnConnectFn; /** * The callback interface was disconnect successfully. @@ -60,20 +93,20 @@ export interface ConnectOptions { /** * The callback interface was disconnect successfully. * - * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability + * @type { OnDisconnectFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - onDisconnect(elementName: ElementName): void; + onDisconnect: OnDisconnectFn; /** * The callback interface was connect failed. * - * @param { int } code - The error code of the failed. + * @typedef { OnFailedFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'7', '1.2':'20'} * @arkts 1.1&1.2 */ - onFailed(code: int): void; + onFailed: OnFailedFn; }