From 749693c8b77c6145c9ea821f578f9500533ab64e Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Fri, 22 Aug 2025 15:25:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E5=BC=80=E5=8F=91=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=98=E5=8E=9F=E4=B8=BAnumber=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzezhong --- api/@ohos.app.ability.ChildProcessArgs.d.ts | 4 +- api/@ohos.app.ability.abilityManager.d.ts | 24 ++++++------ ...@ohos.app.ability.childProcessManager.d.ts | 16 ++++---- api/@ohos.app.ability.quickFixManager.d.ts | 8 ++-- api/@ohos.app.appstartup.StartupConfig.d.ts | 4 +- ...ohos.application.uriPermissionManager.d.ts | 10 ++--- api/app/processInfo.d.ts | 4 +- api/application/AutoFillPopupConfig.d.ts | 8 ++-- api/application/AutoFillRect.d.ts | 16 ++++---- api/application/AutoStartupInfo.d.ts | 4 +- api/application/BusinessAbilityInfo.d.ts | 12 +++--- api/application/KioskStatus.d.ts | 4 +- api/application/MissionListener.d.ts | 28 +++++++------- api/application/PageNodeInfo.d.ts | 8 ++-- api/application/ServiceExtensionContext.d.ts | 38 +++++++++---------- api/application/UIAbilityContext.d.ts | 4 +- .../UIServiceExtensionContext.d.ts | 8 ++-- 17 files changed, 100 insertions(+), 100 deletions(-) diff --git a/api/@ohos.app.ability.ChildProcessArgs.d.ts b/api/@ohos.app.ability.ChildProcessArgs.d.ts index dd2473aedf..95fbe68e3c 100644 --- a/api/@ohos.app.ability.ChildProcessArgs.d.ts +++ b/api/@ohos.app.ability.ChildProcessArgs.d.ts @@ -41,10 +41,10 @@ export interface ChildProcessArgs { /** * Indicates file descriptors that use to communicate between two processes. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 12 */ - fds?: Record; + fds?: Record; } \ No newline at end of file diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index 62726632ab..b64b62d7c9 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -297,7 +297,7 @@ declare namespace abilityManager { * obtain information about the current extension. * * @permission ohos.permission.GET_RUNNING_INFO - * @param { int } upperLimit - Get the maximum limit of the number of messages. + * @param { number } upperLimit - Get the maximum limit of the number of messages. * @returns { Promise> } Returns the array of ExtensionRunningInfo. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -307,14 +307,14 @@ declare namespace abilityManager { * @systemapi * @since 9 */ - function getExtensionRunningInfos(upperLimit: int): Promise>; + function getExtensionRunningInfos(upperLimit: number): Promise>; /** * If you apply for permission, you can obtain information about all extensions. If you do not apply, you can only * obtain information about the current extension. * * @permission ohos.permission.GET_RUNNING_INFO - * @param { int } upperLimit - Get the maximum limit of the number of messages. + * @param { number } upperLimit - Get the maximum limit of the number of messages. * @param { AsyncCallback> } callback - The callback is used to return the array of * ExtensionRunningInfo. * @throws { BusinessError } 202 - Not system application. @@ -325,7 +325,7 @@ declare namespace abilityManager { * @systemapi * @since 9 */ - function getExtensionRunningInfos(upperLimit: int, callback: AsyncCallback>): void; + function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void; /** * Get the top ability information of the display. @@ -372,7 +372,7 @@ declare namespace abilityManager { /** * Acquire the shared data from target ability. * - * @param { int } missionId - The missionId of target ability. + * @param { number } missionId - The missionId of target ability. * @param { AsyncCallback> } callback - The callback is used to return the params of sharing * data and result code. * @throws { BusinessError } 202 - Not system application. @@ -383,7 +383,7 @@ declare namespace abilityManager { * @systemapi * @since 11 */ - function acquireShareData(missionId: int, callback: AsyncCallback>): void; + function acquireShareData(missionId: number, callback: AsyncCallback>): void; /** * Acquire the shared data from target ability. @@ -401,7 +401,7 @@ declare namespace abilityManager { /** * Acquire the shared data from target ability. * - * @param { int } missionId - The missionId of target ability. + * @param { number } missionId - The missionId of target ability. * @returns { Promise> } The promise returned by the function. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -411,12 +411,12 @@ declare namespace abilityManager { * @systemapi * @since 11 */ - function acquireShareData(missionId: int): Promise>; + function acquireShareData(missionId: number): Promise>; /** * Notify the result of save as to target ability. * @param { AbilityResult } parameter - Indicates the result to return. - * @param { int } requestCode - Request code defined by the user. + * @param { number } requestCode - Request code defined by the user. * @param { AsyncCallback } callback - The callback of the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -428,12 +428,12 @@ declare namespace abilityManager { * @StageModelOnly * @since 10 */ - function notifySaveAsResult(parameter: AbilityResult, requestCode: int, callback: AsyncCallback): void; + function notifySaveAsResult(parameter: AbilityResult, requestCode: number, callback: AsyncCallback): void; /** * Notify the result of save as to target ability. * @param { AbilityResult } parameter - Indicates the result to return. - * @param { int } requestCode - Request code defined by the user. + * @param { number } requestCode - Request code defined by the user. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -445,7 +445,7 @@ declare namespace abilityManager { * @StageModelOnly * @since 10 */ - function notifySaveAsResult(parameter: AbilityResult, requestCode: int): Promise; + function notifySaveAsResult(parameter: AbilityResult, requestCode: number): Promise; /** * Get the foreground ui abilities. diff --git a/api/@ohos.app.ability.childProcessManager.d.ts b/api/@ohos.app.ability.childProcessManager.d.ts index d09a5e09aa..683fe96719 100644 --- a/api/@ohos.app.ability.childProcessManager.d.ts +++ b/api/@ohos.app.ability.childProcessManager.d.ts @@ -66,7 +66,7 @@ declare namespace childProcessManager { * * @param { string } srcEntry - Child process source file entrance to be started. * @param { StartMode } startMode - Child process start mode. - * @returns { Promise } Returns the started child process pid. + * @returns { Promise } Returns the started child process pid. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. @@ -76,14 +76,14 @@ declare namespace childProcessManager { * @stagemodelonly * @since 11 */ - function startChildProcess(srcEntry: string, startMode: StartMode): Promise; + function startChildProcess(srcEntry: string, startMode: StartMode): Promise; /** * Start child process with the given src entry and mode. * * @param { string } srcEntry - Child process source file entrance to be started. * @param { StartMode } startMode - Child process start mode. - * @param { AsyncCallback } callback - The callback of startChildProcess. + * @param { AsyncCallback } callback - The callback of startChildProcess. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. @@ -93,7 +93,7 @@ declare namespace childProcessManager { * @stagemodelonly * @since 11 */ - function startChildProcess(srcEntry: string, startMode: StartMode, callback: AsyncCallback): void; + function startChildProcess(srcEntry: string, startMode: StartMode, callback: AsyncCallback): void; /** * Start child process with the given args and options. @@ -117,7 +117,7 @@ declare namespace childProcessManager { * @param { string } srcEntry - Indicates child process source file entrance to be started. * @param { ChildProcessArgs } args - Indicates args to pass to child process. * @param { ChildProcessOptions } [options] - Indicates options for starting child process. - * @returns { Promise } Returns the started child process pid. + * @returns { Promise } Returns the started child process pid. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. @@ -128,7 +128,7 @@ declare namespace childProcessManager { * @stagemodelonly * @since 13 */ - function startArkChildProcess(srcEntry: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; + function startArkChildProcess(srcEntry: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; /** * Start native child process with the given args and options. @@ -136,7 +136,7 @@ declare namespace childProcessManager { * @param { string } entryPoint - Indicates entry point of child process, consisting of library and entry function, such as "libEntry.so:Main". * @param { ChildProcessArgs } args - Indicates args to pass to child process. * @param { ChildProcessOptions } [options] - Indicates options for starting child process. - * @returns { Promise } Returns the started child process pid. + * @returns { Promise } Returns the started child process pid. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -147,7 +147,7 @@ declare namespace childProcessManager { * @stagemodelonly * @since 13 */ - function startNativeChildProcess(entryPoint: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; + function startNativeChildProcess(entryPoint: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; } diff --git a/api/@ohos.app.ability.quickFixManager.d.ts b/api/@ohos.app.ability.quickFixManager.d.ts index 77da4a0905..99f73be5ae 100644 --- a/api/@ohos.app.ability.quickFixManager.d.ts +++ b/api/@ohos.app.ability.quickFixManager.d.ts @@ -95,13 +95,13 @@ declare namespace quickFixManager { /** * The version number of the bundle. * - * @type { long } + * @type { number } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.QuickFix * @systemapi * @since 9 */ - readonly bundleVersionCode: long; + readonly bundleVersionCode: number; /** * The version name of the bundle. @@ -117,13 +117,13 @@ declare namespace quickFixManager { /** * The version number of the quick fix. * - * @type { long } + * @type { number } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.QuickFix * @systemapi * @since 9 */ - readonly quickFixVersionCode: long; + readonly quickFixVersionCode: number; /** * The version name of the quick fix. diff --git a/api/@ohos.app.appstartup.StartupConfig.d.ts b/api/@ohos.app.appstartup.StartupConfig.d.ts index 41bef11f66..8e5917b48b 100644 --- a/api/@ohos.app.appstartup.StartupConfig.d.ts +++ b/api/@ohos.app.appstartup.StartupConfig.d.ts @@ -32,13 +32,13 @@ export default interface StartupConfig { /** * Indicates timeout for executing all startup tasks. Default value is 10000 milliseconds. * - * @type { ?int } + * @type { ?number } * @default 10000 * @syscap SystemCapability.Ability.AppStartup * @stagemodelonly * @since 12 */ - timeoutMs?: int; + timeoutMs?: number; /** * Indicates a listener for startup, which will be called when all tasks complete. diff --git a/api/@ohos.application.uriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts index a69039892a..57eb4ee447 100644 --- a/api/@ohos.application.uriPermissionManager.d.ts +++ b/api/@ohos.application.uriPermissionManager.d.ts @@ -343,7 +343,7 @@ declare namespace uriPermissionManager { * @param { wantConstant.Flags } flag - wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION, * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. - * @param { int } targetTokenId - Indicates the token id of target application. + * @param { number } targetTokenId - Indicates the token id of target application. * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 801 - Capability not supported. @@ -357,7 +357,7 @@ declare namespace uriPermissionManager { * @systemapi Hide this for inner system use. * @since 20 */ - function grantUriPermissionByKey(key: string, flag: wantConstant.Flags, targetTokenId: int): Promise; + function grantUriPermissionByKey(key: string, flag: wantConstant.Flags, targetTokenId: number): Promise; /** * Grant URIs in UDkey to another application @@ -366,8 +366,8 @@ declare namespace uriPermissionManager { * @param { wantConstant.Flags } flag - wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION, * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. - * @param { int } callerTokenId - Indicates the token id of caller application. - * @param { int } targetTokenId - Indicates the token id of target application. + * @param { number } callerTokenId - Indicates the token id of caller application. + * @param { number } targetTokenId - Indicates the token id of target application. * @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. @@ -383,7 +383,7 @@ declare namespace uriPermissionManager { * @systemapi Hide this for inner system use. * @since 20 */ - function grantUriPermissionByKeyAsCaller(key: string, flag: wantConstant.Flags, callerTokenId: int, targetTokenId: int): Promise; + function grantUriPermissionByKeyAsCaller(key: string, flag: wantConstant.Flags, callerTokenId: number, targetTokenId: number): Promise; } export default uriPermissionManager; \ No newline at end of file diff --git a/api/app/processInfo.d.ts b/api/app/processInfo.d.ts index ad16729547..8c09ec0698 100644 --- a/api/app/processInfo.d.ts +++ b/api/app/processInfo.d.ts @@ -27,11 +27,11 @@ export interface ProcessInfo { /** * The id of the current process * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 7 */ - pid: int; + pid: number; /** * The name of the current process diff --git a/api/application/AutoFillPopupConfig.d.ts b/api/application/AutoFillPopupConfig.d.ts index d892e129e7..7c434db2be 100644 --- a/api/application/AutoFillPopupConfig.d.ts +++ b/api/application/AutoFillPopupConfig.d.ts @@ -64,24 +64,24 @@ /** * The width of the popup. * - * @type { double } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 12 */ - width: double; + width: number; /** * The height of the popup. * - * @type { double } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 12 */ - height: double; + height: number; } /** diff --git a/api/application/AutoFillRect.d.ts b/api/application/AutoFillRect.d.ts index 7a5283bb09..9918835ac0 100644 --- a/api/application/AutoFillRect.d.ts +++ b/api/application/AutoFillRect.d.ts @@ -31,44 +31,44 @@ export default interface AutoFillRect { /** * The left of the rect. * - * @type { double } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 12 */ - left: double; + left: number; /** * The top of the rect. * - * @type { double } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 12 */ - top: double; + top: number; /** * The width of the rect. * - * @type { double } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 12 */ - width: double; + width: number; /** * The height of the rect. * - * @type { double } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 12 */ - height: double; + height: number; } \ No newline at end of file diff --git a/api/application/AutoStartupInfo.d.ts b/api/application/AutoStartupInfo.d.ts index 70bfb5433d..9e1dd27085 100644 --- a/api/application/AutoStartupInfo.d.ts +++ b/api/application/AutoStartupInfo.d.ts @@ -74,13 +74,13 @@ export interface AutoStartupInfo { /** * The app clone index of ability instance. - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since 12 */ - appCloneIndex?: int; + appCloneIndex?: number ; /** * The user id of application. diff --git a/api/application/BusinessAbilityInfo.d.ts b/api/application/BusinessAbilityInfo.d.ts index 0c0f1e4cab..ac287a950d 100755 --- a/api/application/BusinessAbilityInfo.d.ts +++ b/api/application/BusinessAbilityInfo.d.ts @@ -66,35 +66,35 @@ export interface BusinessAbilityInfo { /** * Indicates the label id of the business ability info * - * @type { int } + * @type { number } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since 10 */ - readonly labelId: int; + readonly labelId: number; /** * Indicates the description id of the business ability info * - * @type { int } + * @type { number } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since 10 */ - readonly descriptionId: int; + readonly descriptionId: number; /** * Indicates the icon id of the business ability info * - * @type { int } + * @type { number } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since 10 */ - readonly iconId: int; + readonly iconId: number; /** * Enumerates types of the business ability info diff --git a/api/application/KioskStatus.d.ts b/api/application/KioskStatus.d.ts index 4d53092490..f787a65b2b 100644 --- a/api/application/KioskStatus.d.ts +++ b/api/application/KioskStatus.d.ts @@ -50,10 +50,10 @@ export interface KioskStatus { /** * The budle uid of kiosk app. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 */ - kioskBundleUid: int; + kioskBundleUid: number; } diff --git a/api/application/MissionListener.d.ts b/api/application/MissionListener.d.ts index b141fbaa10..bfa9de00d6 100644 --- a/api/application/MissionListener.d.ts +++ b/api/application/MissionListener.d.ts @@ -32,71 +32,71 @@ export interface MissionListener { /** * Called by system when mission created. * - * @param { int } mission - Indicates the id of created mission. + * @param { number } mission - Indicates the id of created mission. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 8 */ - onMissionCreated(mission: int): void; + onMissionCreated(mission: number): void; /** * Called by system when mission destroyed. * - * @param { int } mission - Indicates the id of destroyed mission. + * @param { number } mission - Indicates the id of destroyed mission. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 8 */ - onMissionDestroyed(mission: int): void; + onMissionDestroyed(mission: number): void; /** * Called by system when mission snapshot changed. * - * @param { int } mission - Indicates the id of the mission which the snapshot changes + * @param { number } mission - Indicates the id of the mission which the snapshot changes * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 8 */ - onMissionSnapshotChanged(mission: int): void; + onMissionSnapshotChanged(mission: number): void; /** * Called by system when mission moved to front. * - * @param { int } mission - Indicates the id of the mission being moved to the foreground. + * @param { number } mission - Indicates the id of the mission being moved to the foreground. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 8 */ - onMissionMovedToFront(mission: int): void; + onMissionMovedToFront(mission: number): void; /** * Called by system when mission label has changed. * - * @param { int } mission - Indicates the id of the mission whose label has changed. + * @param { number } mission - Indicates the id of the mission whose label has changed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 9 */ - onMissionLabelUpdated(mission: int): void; + onMissionLabelUpdated(mission: number): void; /** * Called by system when mission icon has changed. * - * @param { int } mission - Indicates the id of the mission whose icon has changed. + * @param { number } mission - Indicates the id of the mission whose icon has changed. * @param { image.PixelMap } icon - Indicates the icon of the mission whose icon has changed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 9 */ - onMissionIconUpdated(mission: int, icon: image.PixelMap): void; + onMissionIconUpdated(mission: number, icon: image.PixelMap): void; /** * Called by system when target mission is closed. * - * @param { int } mission - Indicates the id of the mission whose ability instance is destroyed. + * @param { number } mission - Indicates the id of the mission whose ability instance is destroyed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi * @since 9 */ - onMissionClosed(mission: int): void; + onMissionClosed(mission: number): void; } diff --git a/api/application/PageNodeInfo.d.ts b/api/application/PageNodeInfo.d.ts index 78a75b0671..5e9749e918 100644 --- a/api/application/PageNodeInfo.d.ts +++ b/api/application/PageNodeInfo.d.ts @@ -34,24 +34,24 @@ export default interface PageNodeInfo { /** * The id of page node. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 11 */ - id: int; + id: number; /** * The depth of page node. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly * @since 11 */ - depth: int; + depth: number; /** * The auto fill type of page node. diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index 282dbd664a..f86b7637d1 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -915,7 +915,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the ability to start. - * @param { int } accountId - Indicates the accountId to start. + * @param { number } accountId - Indicates the accountId to start. * @param { AsyncCallback } callback - The callback of startAbilityWithAccount. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -950,7 +950,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 14 */ - startAbilityWithAccount(want: Want, accountId: int, callback: AsyncCallback): void; + startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; /** * Service extension uses this method to start a specific ability with account. @@ -1064,7 +1064,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the ability to start. - * @param { int } accountId - Indicates the accountId to start. + * @param { number } accountId - Indicates the accountId to start. * @param { StartOptions } options - Indicates the start options. * @param { AsyncCallback } callback - The callback of startAbilityWithAccount. * @throws { BusinessError } 201 - The application does not have permission to call the interface. @@ -1098,7 +1098,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 14 */ - startAbilityWithAccount(want: Want, accountId: int, options: StartOptions, callback: AsyncCallback): void; + startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; /** * Service extension uses this method to start a specific ability with account. If the caller application is in foreground, @@ -1186,7 +1186,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the ability to start. - * @param { int } accountId - Indicates the accountId to start. + * @param { number } accountId - Indicates the accountId to start. * @param { StartOptions } [options] - Indicates the start options. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - The application does not have permission to call the interface. @@ -1222,7 +1222,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 14 */ - startAbilityWithAccount(want: Want, accountId: int, options?: StartOptions): Promise; + startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise; /** * Starts a new service extension ability. @@ -1456,7 +1456,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the want info to start. - * @param { int } accountId - Indicates the account to start. + * @param { number } accountId - Indicates the account to start. * @param { AsyncCallback } callback - The callback of startServiceExtensionAbilityWithAccount. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -1479,7 +1479,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 12 */ - startServiceExtensionAbilityWithAccount(want: Want, accountId: int, callback: AsyncCallback): void; + startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; /** * Starts a new service extension ability with account. @@ -1545,7 +1545,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the want info to start. - * @param { int } accountId - Indicates the account to start. + * @param { number } accountId - Indicates the account to start. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -1568,7 +1568,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 12 */ - startServiceExtensionAbilityWithAccount(want: Want, accountId: int): Promise; + startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise; /** * Stops a service within the same application. @@ -1700,7 +1700,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the want info to start. - * @param { int } accountId - Indicates the accountId to start. + * @param { number } accountId - Indicates the accountId to start. * @param { AsyncCallback } callback - The callback of stopServiceExtensionAbilityWithAccount. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -1719,7 +1719,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 10 */ - stopServiceExtensionAbilityWithAccount(want: Want, accountId: int, callback: AsyncCallback): void; + stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; /** * Stops a service within the same application with account. @@ -1753,7 +1753,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the want info to start. - * @param { int } accountId - Indicates the accountId to start. + * @param { number } accountId - Indicates the accountId to start. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -1772,7 +1772,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 10 */ - stopServiceExtensionAbilityWithAccount(want: Want, accountId: int): Promise; + stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise; /** * Destroys this service extension. @@ -1929,9 +1929,9 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the service extension to connect. - * @param { int } accountId - Indicates the account to connect. + * @param { number } accountId - Indicates the account to connect. * @param { ConnectOptions } options - Indicates the callback of connection. - * @returns { long } Returns the connection id. + * @returns { number } Returns the connection id. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1951,7 +1951,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 10 */ - connectServiceExtensionAbilityWithAccount(want: Want, accountId: int, options: ConnectOptions): long; + connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; /** * Disconnect an ability from a service extension, in contrast to {@link connectAbility}. @@ -2050,7 +2050,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the ability to start. - * @param { int } accountId - Indicates the account to start. + * @param { number } accountId - Indicates the account to start. * @returns { Promise } Returns the Caller interface. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -2072,7 +2072,7 @@ declare class ServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 10 */ - startAbilityByCallWithAccount(want: Want, accountId: int): Promise; + startAbilityByCallWithAccount(want: Want, accountId: number): Promise; /** * Service extension uses this method to start a specific ability, diff --git a/api/application/UIAbilityContext.d.ts b/api/application/UIAbilityContext.d.ts index d3a355b5fb..4cfcad487d 100644 --- a/api/application/UIAbilityContext.d.ts +++ b/api/application/UIAbilityContext.d.ts @@ -1371,7 +1371,7 @@ declare class UIAbilityContext extends Context { * * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Want } want - Indicates the ability to start. - * @param { int } accountId - Indicates the account to start. + * @param { number } accountId - Indicates the account to start. * @returns { Promise } Returns the Caller interface. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. @@ -1400,7 +1400,7 @@ declare class UIAbilityContext extends Context { * @stagemodelonly * @since 14 */ - startAbilityByCallWithAccount(want: Want, accountId: int): Promise; + startAbilityByCallWithAccount(want: Want, accountId: number): Promise; /** * Starts a new ability with account. If the caller application is in foreground, diff --git a/api/application/UIServiceExtensionContext.d.ts b/api/application/UIServiceExtensionContext.d.ts index 8100602bfe..f4be665a63 100644 --- a/api/application/UIServiceExtensionContext.d.ts +++ b/api/application/UIServiceExtensionContext.d.ts @@ -115,7 +115,7 @@ export default class UIServiceExtensionContext extends ExtensionContext { * * @param { Want } want - Indicates the service extension to connect. * @param { ConnectOptions } options - Indicates the callback of connection. - * @returns { long } Returns the connection id. + * @returns { number } Returns the connection id. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -135,12 +135,12 @@ export default class UIServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 14 */ - connectServiceExtensionAbility(want: Want, options: ConnectOptions): long; + connectServiceExtensionAbility(want: Want, options: ConnectOptions): number; /** * Disconnect an ability from a service extension, in contrast to {@link connectServiceExtensionAbility}. * - * @param { long } connectionId - the connection id returned from connectServiceExtensionAbility api. + * @param { number } connectionId - the connection id returned from connectServiceExtensionAbility api. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -151,5 +151,5 @@ export default class UIServiceExtensionContext extends ExtensionContext { * @stagemodelonly * @since 14 */ - disconnectServiceExtensionAbility(connectionId: long): Promise; + disconnectServiceExtensionAbility(connectionId: number): Promise; } -- Gitee