From eb937d548b8fbcc0c93b39ee05b6b092a3e1e949 Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Tue, 29 Jul 2025 15:43:12 +0800 Subject: [PATCH] number to idl sdk Signed-off-by: zhangzezhong --- ...s.app.ability.AppServiceExtensionAbility.d.ts | 4 ++-- ...os.app.ability.UIServiceExtensionAbility.d.ts | 4 ++-- api/@ohos.app.ability.dataUriUtils.d.ts | 12 ++++++------ api/@ohos.application.uriPermissionManager.d.ts | 16 ++++++++-------- api/application/AbilityStartCallback.d.ts | 4 ++-- api/application/AppStateData.d.ts | 8 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts b/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts index 4293980bea..1657b22be6 100644 --- a/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts @@ -65,13 +65,13 @@ export default class AppServiceExtensionAbility extends ExtensionAbility { * Called back when an app service extension is started. * * @param { Want } want - Indicates the want of app service extension to start. - * @param { number } startId - Indicates the number of times the app service extension has been started. + * @param { int } startId - Indicates the number of times the app service extension has been started. * The {@code startId} is incremented by 1 every time the app service extension is started. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 */ - onRequest(want: Want, startId: number): void; + onRequest(want: Want, startId: int): void; /** * Called back when an app service extension is first connected to an ability. diff --git a/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts b/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts index 1371b622ce..fe6a777af1 100644 --- a/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts @@ -60,7 +60,7 @@ export default class UIServiceExtensionAbility extends ExtensionAbility { * Called back when a UI service extension is started. * * @param { Want } want - Indicates the want of UI service extension to start. - * @param { number } startId - Indicates the number of times the UI service extension has been started. + * @param { int } startId - Indicates the number of times the UI service extension has been started. * The {@code startId} is incremented by 1 every time the UI service extension is started. * For example, if the UI service extension has been started for six times. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -68,7 +68,7 @@ export default class UIServiceExtensionAbility extends ExtensionAbility { * @stagemodelonly * @since 14 */ - onRequest(want: Want, startId: number): void; + onRequest(want: Want, startId: int): void; /** * Called back when a UI service extension is connected to an ability. diff --git a/api/@ohos.app.ability.dataUriUtils.d.ts b/api/@ohos.app.ability.dataUriUtils.d.ts index 63ba6905b8..d1bf1ee817 100644 --- a/api/@ohos.app.ability.dataUriUtils.d.ts +++ b/api/@ohos.app.ability.dataUriUtils.d.ts @@ -31,20 +31,20 @@ declare namespace dataUriUtils { * Obtains the ID attached to the end of the path component of the given uri. * * @param { string } uri - Indicates the uri object from which the ID is to be obtained. - * @returns { number } Returns the ID attached to the end of the path component; + * @returns { double } Returns the ID attached to the end of the path component; * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function getId(uri: string): number; + function getId(uri: string): double; /** * Attaches the given ID to the end of the path component of the given uri. * * @param { string } uri - Indicates the uri string from which the ID is to be obtained. - * @param { number } id - Indicates the ID to attach. + * @param { double } id - Indicates the ID to attach. * @returns { string } Returns the uri object with the given ID attached. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -52,7 +52,7 @@ declare namespace dataUriUtils { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function attachId(uri: string, id: number): string; + function attachId(uri: string, id: double): string; /** * Deletes the ID from the end of the path component of the given uri. @@ -71,7 +71,7 @@ declare namespace dataUriUtils { * Updates the ID in the specified uri * * @param { string } uri - Indicates the uri object to be updated. - * @param { number } id - Indicates the new ID. + * @param { double } id - Indicates the new ID. * @returns { string } Returns the updated uri object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -79,6 +79,6 @@ declare namespace dataUriUtils { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function updateId(uri: string, id: number): string; + function updateId(uri: string, id: double): string; } export default dataUriUtils; diff --git a/api/@ohos.application.uriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts index a69039892a..c2ed04c0c1 100644 --- a/api/@ohos.application.uriPermissionManager.d.ts +++ b/api/@ohos.application.uriPermissionManager.d.ts @@ -62,7 +62,7 @@ declare namespace uriPermissionManager { * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. * @param { string } targetBundleName - Indicates the bundle name of authorization target. - * @param { AsyncCallback } callback - the callback of grantUriPermission. + * @param { AsyncCallback } callback - the callback of grantUriPermission. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -82,7 +82,7 @@ declare namespace uriPermissionManager { uri: string, flag: wantConstant.Flags, targetBundleName: string, - callback: AsyncCallback + callback: AsyncCallback ): void; /** @@ -117,7 +117,7 @@ declare namespace uriPermissionManager { * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. * @param { string } targetBundleName - Indicates the bundle name of authorization target. - * @returns { Promise } - the promise returned by the function. + * @returns { Promise } - the promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -133,7 +133,7 @@ declare namespace uriPermissionManager { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string): Promise; + function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string): Promise; /** * Grant URI to another application @@ -228,7 +228,7 @@ declare namespace uriPermissionManager { * * @param { string } uri - File URI. * @param { string } targetBundleName - Indicates the bundle name of authorization target. - * @param { AsyncCallback } callback - the callback of revokeUriPermission. + * @param { AsyncCallback } callback - the callback of revokeUriPermission. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified; @@ -241,7 +241,7 @@ declare namespace uriPermissionManager { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - function revokeUriPermission(uri: string, targetBundleName: string, callback: AsyncCallback): void; + function revokeUriPermission(uri: string, targetBundleName: string, callback: AsyncCallback): void; /** * Revoke URI from one application @@ -282,7 +282,7 @@ declare namespace uriPermissionManager { * * @param { string } uri - File URI. * @param { string } targetBundleName - Indicates the bundle name of authorization target. - * @returns { Promise } - the promise returned by the function. + * @returns { Promise } - the promise returned by the function. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified; @@ -295,7 +295,7 @@ declare namespace uriPermissionManager { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - function revokeUriPermission(uri: string, targetBundleName: string): Promise; + function revokeUriPermission(uri: string, targetBundleName: string): Promise; /** * Revoke URI from one application diff --git a/api/application/AbilityStartCallback.d.ts b/api/application/AbilityStartCallback.d.ts index 96863528bf..372f5cdd12 100644 --- a/api/application/AbilityStartCallback.d.ts +++ b/api/application/AbilityStartCallback.d.ts @@ -63,7 +63,7 @@ declare interface AbilityStartCallback { /** * Called when some error occurred except disconnected from UIAbility or UIExtensionAbility. * - * @param { number } code - The code returned if the UIAbility or UIExtensionAbility failed to start. + * @param { int } code - The code returned if the UIAbility or UIExtensionAbility failed to start. * @param { string } name - The name returned if the UIAbility or UIExtensionAbility failed to start. * @param { string } message - The message returned if the UIAbility or UIExtensionAbility failed to start. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -72,7 +72,7 @@ declare interface AbilityStartCallback { * @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. diff --git a/api/application/AppStateData.d.ts b/api/application/AppStateData.d.ts index 8031f67355..fbca61a70c 100644 --- a/api/application/AppStateData.d.ts +++ b/api/application/AppStateData.d.ts @@ -39,22 +39,22 @@ declare class AppStateData { /** * The uid. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * The application state. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - state: number; + state: int; /** * Indicates whether the application has splitted screens. -- Gitee