diff --git a/api/@ohos.app.ability.AbilityConstant.d.ts b/api/@ohos.app.ability.AbilityConstant.d.ts index 660207d7ed248a4300e9bdaec29c49861926334e..a3119215395bad07f7c7a0e662411b5814cf3967 100644 --- a/api/@ohos.app.ability.AbilityConstant.d.ts +++ b/api/@ohos.app.ability.AbilityConstant.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + /** * The definition of AbilityConstant. * @@ -187,14 +191,14 @@ declare namespace AbilityConstant { /** * Indicates the exited process id * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** * Indicates the exited process name @@ -211,26 +215,26 @@ declare namespace AbilityConstant { /** * Indicates the uid of exited process * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * Indicates the exit sub-reason * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - exitSubReason: number; + exitSubReason: int; /** * Indicates the exit detailed reason @@ -247,38 +251,38 @@ declare namespace AbilityConstant { /** * Indicates the rss value when process exit * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - rss: number; + rss: int; /** * Indicates the pss value when process exit * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - pss: number; + pss: int; /** * Indicates the timestamp when process exit * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: int; } /** diff --git a/api/@ohos.app.ability.Configuration.d.ts b/api/@ohos.app.ability.Configuration.d.ts index 5430c59bb46f26103f1f1951e7d424c46334215b..eb4866755fe54f0c815b33fe54ae6da9525f6277 100644 --- a/api/@ohos.app.ability.Configuration.d.ts +++ b/api/@ohos.app.ability.Configuration.d.ts @@ -17,6 +17,9 @@ * @file * @kit AbilityKit */ +/*** if arkts 1.1 */ + import { int , double } from '../@ohos.base' +/*** endif */ import ConfigurationConstant from './@ohos.app.ability.ConfigurationConstant'; @@ -164,13 +167,13 @@ export interface Configuration { /** * Indicates the displayId of the current device. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: int; /** * Indicates whether a pointer type device has connected. @@ -212,25 +215,25 @@ export interface Configuration { /** * Indicates the font size scale. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - fontSizeScale?: number; + fontSizeScale?: double; /** * Indicates the font weight scale. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - fontWeightScale?: number; + fontWeightScale?: double; /** * Indicates the mobile country code. diff --git a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts index d165ae8b8da9904df45b1b82d62ee9db5197b442..406b4a2a2e82d2ee7fad69ca920dc2ef169e1652 100644 --- a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ + import { int , double } from '../@ohos.base' +/*** endif */ + import rpc from './@ohos.rpc'; import ServiceExtensionContext from './application/ServiceExtensionContext'; import Want from './@ohos.app.ability.Want'; @@ -72,7 +76,7 @@ declare class ServiceExtensionAbility { * Called back when a service extension is started. * * @param { Want } want - Indicates the want of service extension to start. - * @param { number } startId - Indicates the number of times the service extension has been started. + * @param { double } startId - Indicates the number of times the service extension has been started. * The {@code startId} is incremented by 1 every time the service extension is started. * For example, if the service extension has been started for six times. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -81,7 +85,7 @@ declare class ServiceExtensionAbility { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - onRequest(want: Want, startId: number): void; + onRequest(want: Want, startId: double): void; /** * Called back when a service extension is first connected to an ability. diff --git a/api/@ohos.app.ability.StartOptions.d.ts b/api/@ohos.app.ability.StartOptions.d.ts index d46757642e3070b356d7b8d0f23520beded6b0bb..95eb50b0eb3e0723a9ed8dda345d482a39b52a6a 100644 --- a/api/@ohos.app.ability.StartOptions.d.ts +++ b/api/@ohos.app.ability.StartOptions.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ + import { int , double } from '../@ohos.base' +/*** endif */ + import contextConstant from "./@ohos.app.ability.contextConstant"; import image from "./@ohos.multimedia.image"; import bundleManager from './@ohos.bundle.bundleManager'; @@ -45,13 +49,13 @@ export default class StartOptions { * {@link ohos.app.ability.AbilityConstant#WindowMode.WINDOW_MODE_SPLIT_SECONDARY} are * valid only in intra-app redirection scenarios. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - windowMode?: number; + windowMode?: int; /** * The type of displayId @@ -64,14 +68,14 @@ export default class StartOptions { /** * The type of displayId * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: int; /** * The target ability with animation or without @@ -87,46 +91,46 @@ export default class StartOptions { /** * The left position of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - windowLeft?: number; + windowLeft?: int; /** * The top position of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - windowTop?: number; + windowTop?: int; /** * The width of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - windowWidth?: number; + windowWidth?: int; /** * The height of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - windowHeight?: number; + windowHeight?: int; /** * Indicates the cold startup window is focused. @@ -202,44 +206,44 @@ export default class StartOptions { /** * The min width of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapAbility.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - minWindowWidth?: number; + minWindowWidth?: int; /** * The min height of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapAbility.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - minWindowHeight?: number; + minWindowHeight?: int; /** * The max width of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapAbility.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - maxWindowWidth?: number; + maxWindowWidth?: int; /** * The max height of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapAbility.Ability.AbilityRuntime.Core * @stagemodelonly * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - maxWindowHeight?: number; + maxWindowHeight?: int; } \ No newline at end of file diff --git a/api/@ohos.app.ability.appManager.d.ts b/api/@ohos.app.ability.appManager.d.ts index ed30a9e398bfdff3fa4b4a358cf12a9dea259ff7..9482ebff2f7cc0af79988a132e7f8bca2b685ff5 100644 --- a/api/@ohos.app.ability.appManager.d.ts +++ b/api/@ohos.app.ability.appManager.d.ts @@ -23,6 +23,7 @@ import { ProcessInformation as _ProcessInformation } from './application/Process import bundleManager from './@ohos.bundle.bundleManager'; import { RunningMultiAppInfo as _RunningMultiAppInfo } from './application/RunningMultiAppInfo'; /*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' import * as _ApplicationStateObserver from './application/ApplicationStateObserver'; import type * as _AppForegroundStateObserver from './application/AppForegroundStateObserver'; import * as _AbilityStateData from './application/AbilityStateData'; @@ -537,7 +538,7 @@ declare namespace appManager { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES * or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - The process bundle name. - * @param { number } accountId - The account id. + * @param { int } accountId - The account id. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -549,7 +550,7 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function killProcessWithAccount(bundleName: string, accountId: number): Promise; + function killProcessWithAccount(bundleName: string, accountId: int): Promise; /** * Kill process with account. @@ -557,9 +558,9 @@ declare namespace appManager { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES * or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - The process bundle name. - * @param { number } accountId - The account id. + * @param { int } accountId - The account id. * @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared. - * @param { number } [appIndex] - The application index. + * @param { int } [appIndex] - The application index. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -570,7 +571,7 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function killProcessWithAccount(bundleName: string, accountId: number, clearPageStack: boolean, appIndex?: number): + function killProcessWithAccount(bundleName: string, accountId: int, clearPageStack: boolean, appIndex?: int): Promise; /** @@ -595,7 +596,7 @@ declare namespace appManager { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES * or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - The process bundle name. - * @param { number } accountId - The account id. + * @param { int } accountId - The account id. * @param { AsyncCallback } callback - The callback of killProcessWithAccount. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -607,7 +608,7 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void; + function killProcessWithAccount(bundleName: string, accountId: int, callback: AsyncCallback): void; /** * Is user running in stability test. @@ -692,7 +693,7 @@ declare namespace appManager { * @permission ohos.permission.KILL_APP_PROCESSES or ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - bundle name. * @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared. - * @param { number } [appIndex] - The application index. + * @param { int } [appIndex] - The application index. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. @@ -701,7 +702,7 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: number): Promise; + function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: int): Promise; /** * Kill processes by bundle name @@ -816,7 +817,7 @@ declare namespace appManager { /** * Get the memory size of the application * - * @returns { Promise } Returns the application memory size. + * @returns { Promise } Returns the application memory size. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 9 @@ -824,14 +825,14 @@ declare namespace appManager { /** * Get the memory size of the application * - * @returns { Promise } Returns the application memory size. + * @returns { Promise } Returns the application memory size. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function getAppMemorySize(): Promise; + function getAppMemorySize(): Promise; /** * Get the memory size of the application @@ -846,7 +847,7 @@ declare namespace appManager { /** * Get the memory size of the application * - * @param { AsyncCallback } callback - The callback is used to return the application memory size. + * @param { AsyncCallback } callback - The callback is used to return the application memory size. * @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. @@ -855,7 +856,7 @@ declare namespace appManager { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function getAppMemorySize(callback: AsyncCallback): void; + function getAppMemorySize(callback: AsyncCallback): void; /** * If you apply for permission, you can obtain information about all running processes. @@ -929,7 +930,7 @@ declare namespace appManager { * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - Indicates the bundle name of the shared bundle. - * @param { number } versionCode - Indicates the version code of the shared bundle. + * @param { int } versionCode - Indicates the version code of the shared bundle. * @returns { Promise } Returns the shared bundle running result. The result is true if running, false otherwise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -941,14 +942,14 @@ declare namespace appManager { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - function isSharedBundleRunning(bundleName: string, versionCode: number): Promise; + function isSharedBundleRunning(bundleName: string, versionCode: int): Promise; /** * Check whether the shared bundle is running. * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - Indicates the bundle name of the shared bundle. - * @param { number } versionCode - Indicates the version code of the shared bundle. + * @param { int } versionCode - Indicates the version code of the shared bundle. * @param { AsyncCallback } callback - The callback of checking the shared bundle running result. * The result is true if running, false otherwise. * @throws { BusinessError } 201 - Permission denied. @@ -961,13 +962,13 @@ declare namespace appManager { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - function isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback): void; + function isSharedBundleRunning(bundleName: string, versionCode: int, callback: AsyncCallback): void; /** * Obtains memory usage of one process by its pid. * - * @param { number } pid - Indicates the pid of the process. - * @returns { Promise } Returns the memory usage of the process in KB. + * @param { int } pid - Indicates the pid of the process. + * @returns { Promise } Returns the memory usage of the process in KB. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -977,13 +978,13 @@ declare namespace appManager { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - function getProcessMemoryByPid(pid: number): Promise; + function getProcessMemoryByPid(pid: int): Promise; /** * Obtains memory usage of one process by its pid. * - * @param { number } pid - Indicates the pid of the process. - * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result. + * @param { int } pid - Indicates the pid of the process. + * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -993,7 +994,7 @@ declare namespace appManager { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - function getProcessMemoryByPid(pid: number, callback: AsyncCallback): void; + function getProcessMemoryByPid(pid: int, callback: AsyncCallback): void; /** * Obtains the process information list of running processes that belong to a specific bundle of current user. @@ -1015,7 +1016,7 @@ declare namespace appManager { * Obtains the process information list of running processes that belong to a specific bundle and specific user ID. * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. - * @param { number } userId - Indicates the user ID of the application to which the processes belong to. + * @param { int } userId - Indicates the user ID of the application to which the processes belong to. * @param { AsyncCallback> } callback - Indicates the callback of getting process information by bundleName result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1026,7 +1027,7 @@ declare namespace appManager { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - function getRunningProcessInfoByBundleName(bundleName: string, userId: number, callback: AsyncCallback>): void; + function getRunningProcessInfoByBundleName(bundleName: string, userId: int, callback: AsyncCallback>): void; /** * Obtains the process information list of running processes that belong to a specific bundle of current user. @@ -1048,7 +1049,7 @@ declare namespace appManager { * Obtains the process information list of running processes that belong to a specific bundle and specific user ID. * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. - * @param { number } userId - Indicates the user ID of the application to which the processes belong to. + * @param { int } userId - Indicates the user ID of the application to which the processes belong to. * @returns { Promise> } Returns a list of process information. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1059,7 +1060,7 @@ declare namespace appManager { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - function getRunningProcessInfoByBundleName(bundleName: string, userId: number): Promise>; + function getRunningProcessInfoByBundleName(bundleName: string, userId: int): Promise>; /** * Check whether the bundle is running. @@ -1101,9 +1102,9 @@ declare namespace appManager { * * @permission ohos.permission.PRELOAD_APPLICATION * @param { string } bundleName - The bundle name of the application to preload. - * @param { number } userId - Indicates the user identification. + * @param { int } userId - Indicates the user identification. * @param { PreloadMode } mode - Preload application mode. - * @param { number } [appIndex] - The index of application clone. + * @param { int } [appIndex] - The index of application clone. * @returns { Promise } Returns the result of preloadApplication. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - Not system application. @@ -1117,7 +1118,7 @@ declare namespace appManager { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function preloadApplication(bundleName: string, userId: number, mode: PreloadMode, appIndex?: number): Promise; + function preloadApplication(bundleName: string, userId: int, mode: PreloadMode, appIndex?: int): Promise; /** * Get all running multi app info by bundleName @@ -1144,7 +1145,7 @@ declare namespace appManager { * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - Indicates the bundle name of the bundle. - * @param { number } [appCloneIndex] - app clone index + * @param { int } [appCloneIndex] - app clone index * @returns { Promise } Returns the bundle running result. The result is true if running, false otherwise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1155,7 +1156,7 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function isAppRunning(bundleName: string, appCloneIndex?: number): Promise; + function isAppRunning(bundleName: string, appCloneIndex?: int): Promise; /** * Clear up application data by bundle name @@ -1198,7 +1199,7 @@ declare namespace appManager { * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - bundle name. - * @returns { Promise> } Returns the list of pid. + * @returns { Promise> } Returns the list of pid. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1211,14 +1212,14 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function getSupportedProcessCachePids(bundleName : string): Promise>; + function getSupportedProcessCachePids(bundleName : string): Promise>; /** * Set keep alive for the specified bundle. * * @permission ohos.permission.MANAGE_APP_KEEP_ALIVE * @param { string } bundleName - bundle name. - * @param { number } userId - user id. + * @param { int } userId - user id. * @param { boolean } enable - flag indicates whether the bundle should be kept alive. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -1236,14 +1237,14 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function setKeepAliveForBundle(bundleName: string, userId: number, enable: boolean): Promise; + function setKeepAliveForBundle(bundleName: string, userId: int, enable: boolean): Promise; /** * Get keep-alive bundle information. * * @permission ohos.permission.MANAGE_APP_KEEP_ALIVE * @param { KeepAliveAppType } type - type of keep-alive apps to be quried. - * @param { number } [userId] - user id. + * @param { int } [userId] - user id. * @returns { Promise> } Returns the list of KeepAliveBundleInfo. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1256,13 +1257,13 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function getKeepAliveBundles(type: KeepAliveAppType, userId?: number): Promise>; + function getKeepAliveBundles(type: KeepAliveAppType, userId?: int): Promise>; /** * Kill processes in batch. * * @permission ohos.permission.KILL_APP_PROCESSES - * @param { Array } pids - The pids of the processes. + * @param { Array } pids - The pids of the processes. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1275,7 +1276,7 @@ declare namespace appManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function killProcessesInBatch(pids: Array): Promise; + function killProcessesInBatch(pids: Array): Promise; /** * The ability or extension state data. diff --git a/api/@ohos.app.ability.insightIntent.d.ts b/api/@ohos.app.ability.insightIntent.d.ts index 4fee2d33202c04e4cc5f3554f5edb8ac631e94fe..b9202a00c92674479c3b9c0c8afef6e2c14fa53f 100644 --- a/api/@ohos.app.ability.insightIntent.d.ts +++ b/api/@ohos.app.ability.insightIntent.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ + import { int , double } from '../@ohos.base' +/*** endif */ + import Want from './@ohos.app.ability.Want'; import type wantConstant from './@ohos.app.ability.wantConstant'; @@ -101,14 +105,14 @@ declare namespace insightIntent { /** * Indicates result code. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - code: number; + code: int; /** * Indicates execute result. @@ -141,14 +145,14 @@ declare namespace insightIntent { * {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}| * {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; } } diff --git a/api/@ohos.app.ability.insightIntentDriver.d.ts b/api/@ohos.app.ability.insightIntentDriver.d.ts index 069c295ce4a0ce50dd5c9ae1b64c39453c5de2e2..5d6cc0090f87e30dfeb88e0a772e2b6e142648a8 100644 --- a/api/@ohos.app.ability.insightIntentDriver.d.ts +++ b/api/@ohos.app.ability.insightIntentDriver.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ + import { int , double } from '../@ohos.base' +/*** endif */ + import Want from './@ohos.app.ability.Want'; import wantConstant from './@ohos.app.ability.wantConstant'; import type { AsyncCallback } from './@ohos.base'; @@ -120,14 +124,14 @@ declare namespace insightIntentDriver { /** * Indicates the display Id, only works when executeMode is UIAbility foreground. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: int; /** * Indicates the URIs will be authorized to the insight intent executor. @@ -148,14 +152,14 @@ declare namespace insightIntentDriver { * {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}| * {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; } /** diff --git a/api/@ohos.app.ability.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts index d661648014cf7c22cda4c9385bd84af4ff277d62..ad6694135c011c01e37bd0213021a8d2db675e1f 100644 --- a/api/@ohos.app.ability.wantAgent.d.ts +++ b/api/@ohos.app.ability.wantAgent.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ + import { int , double } from '../@ohos.base' +/*** endif */ + import { AsyncCallback, Callback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; import { WantAgentInfo as _WantAgentInfo } from './wantAgent/wantAgentInfo'; @@ -114,7 +118,7 @@ declare namespace wantAgent { * Obtains the UID of a WantAgent. * * @param { WantAgent } agent - Indicates the WantAgent. - * @param { AsyncCallback } callback - The callback is used to return the UID. + * @param { AsyncCallback } callback - The callback is used to return the UID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. @@ -124,7 +128,7 @@ declare namespace wantAgent { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function getUid(agent: WantAgent, callback: AsyncCallback): void; + function getUid(agent: WantAgent, callback: AsyncCallback): void; /** * Obtains the UID of a WantAgent. @@ -142,7 +146,7 @@ declare namespace wantAgent { * Obtains the UID of a WantAgent. * * @param { WantAgent } agent - Indicates the WantAgent. - * @returns { Promise } Returns the UID. + * @returns { Promise } Returns the UID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. @@ -151,7 +155,7 @@ declare namespace wantAgent { * @atomicservice * @since 12 */ - function getUid(agent: WantAgent): Promise; + function getUid(agent: WantAgent): Promise; /** * Obtains the {@link Want} of an {@link WantAgent}. @@ -394,7 +398,7 @@ declare namespace wantAgent { * Obtains the {@link OperationType} of a {@link WantAgent}. * * @param { WantAgent } agent - Indicates the WantAgent. - * @param { AsyncCallback } callback - The callback is used to return the OperationType of the WantAgent. + * @param { AsyncCallback } callback - The callback is used to return the OperationType of the WantAgent. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. @@ -405,7 +409,7 @@ declare namespace wantAgent { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function getOperationType(agent: WantAgent, callback: AsyncCallback): void; + function getOperationType(agent: WantAgent, callback: AsyncCallback): void; /** * Obtains the {@link OperationType} of a {@link WantAgent}. @@ -424,7 +428,7 @@ declare namespace wantAgent { * Obtains the {@link OperationType} of a {@link WantAgent}. * * @param { WantAgent } agent - Indicates the WantAgent. - * @returns { Promise } Returns the OperationType of the WantAgent. + * @returns { Promise } Returns the OperationType of the WantAgent. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. @@ -435,7 +439,7 @@ declare namespace wantAgent { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function getOperationType(agent: WantAgent): Promise; + function getOperationType(agent: WantAgent): Promise; /** * Set the wantagent within the process to support multithreading. @@ -809,13 +813,13 @@ declare namespace wantAgent { /** * Request code used to trigger the WantAgent. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - finalCode: number; + finalCode: int; /** * Final data collected by the common event. diff --git a/api/ability/abilityResult.d.ts b/api/ability/abilityResult.d.ts index 636c91f97b799ca30d97f39dfab5a426d396d39e..ac469a2a3f797242a579b35e435a8aa9a2024bf1 100644 --- a/api/ability/abilityResult.d.ts +++ b/api/ability/abilityResult.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + import Want from '../@ohos.app.ability.Want'; /** @@ -45,13 +49,13 @@ export interface AbilityResult { * Indicates the result code returned after the ability is destroyed. You can define the result * code to identify an error. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - resultCode: number; + resultCode: int; /** * Indicates the data returned after the ability is destroyed. You can define the data returned. diff --git a/api/application/AbilityDelegator.d.ts b/api/application/AbilityDelegator.d.ts index 532b10238ca492efee195b71efb07707019f9f18..e8eab2649fafaa0a51399b4427a48398bc6d6bb2 100644 --- a/api/application/AbilityDelegator.d.ts +++ b/api/application/AbilityDelegator.d.ts @@ -18,6 +18,9 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ import AbilityStage from '../@ohos.app.ability.AbilityStage'; import { AbilityStageMonitor } from './AbilityStageMonitor'; import { AsyncCallback } from '../@ohos.base'; @@ -500,7 +503,7 @@ export interface AbilityDelegator { * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. * * @param { AbilityMonitor } monitor - AbilityMonitor object. - * @param { number } timeout - Maximum wait time, in milliseconds. + * @param { int } timeout - Maximum wait time, in milliseconds. * @param { AsyncCallback } callback - The callback is used to return the Ability object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed. @@ -510,7 +513,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; + waitAbilityMonitor(monitor: AbilityMonitor, timeout: int, callback: AsyncCallback): void; /** * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. @@ -539,7 +542,7 @@ export interface AbilityDelegator { * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. * * @param { AbilityMonitor } monitor - AbilityMonitor object. - * @param { number } [timeout] - Maximum wait time, in milliseconds. + * @param { int } [timeout] - Maximum wait time, in milliseconds. * @returns { Promise } Returns the Ability object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed. @@ -549,7 +552,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise; + waitAbilityMonitor(monitor: AbilityMonitor, timeout?: int): Promise; /** * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor. @@ -614,7 +617,7 @@ export interface AbilityDelegator { * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor. * * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object. - * @param { number } timeout - Maximum wait time, in milliseconds. + * @param { int } timeout - Maximum wait time, in milliseconds. * @param { AsyncCallback } callback - The callback is used to return the AbilityStage object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed. @@ -624,7 +627,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback: AsyncCallback): void; + waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: int, callback: AsyncCallback): void; /** * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor. @@ -653,7 +656,7 @@ export interface AbilityDelegator { * Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor. * * @param { AbilityStageMonitor } monitor - AbilityStageMonitor object. - * @param { number } [timeout] - Maximum wait time, in milliseconds. + * @param { int } [timeout] - Maximum wait time, in milliseconds. * @returns { Promise } Returns the AbilityStage object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed. @@ -663,7 +666,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise; + waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: int): Promise; /** * Obtain the application context. @@ -715,7 +718,7 @@ export interface AbilityDelegator { * Obtain the lifecycle state of a specified ability. * * @param { UIAbility } ability - The Ability object. - * @returns { number } Returns the state of the Ability object. + * @returns { int } Returns the state of the Ability object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform @@ -723,7 +726,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - getAbilityState(ability: UIAbility): number; + getAbilityState(ability: UIAbility): int; /** * Obtain the ability that is currently being displayed in this process. @@ -1216,14 +1219,14 @@ export interface AbilityDelegator { * Execute the given command in the aa tools side. * * @param { string } cmd - Shell command - * @param { number } timeoutSecs - Timeout, in seconds + * @param { int } timeoutSecs - Timeout, in seconds * @param { AsyncCallback } callback - The callback of executeShellCommand. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback): void; + executeShellCommand(cmd: string, timeoutSecs: int, callback: AsyncCallback): void; /** * Execute the given command in the aa tools side. @@ -1238,14 +1241,14 @@ export interface AbilityDelegator { * Execute the given command in the aa tools side. * * @param { string } cmd - Shell command - * @param { number } [timeoutSecs] - Timeout, in seconds + * @param { int } [timeoutSecs] - Timeout, in seconds * @returns { Promise } the promise returned by the function. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - executeShellCommand(cmd: string, timeoutSecs?: number): Promise; + executeShellCommand(cmd: string, timeoutSecs?: int): Promise; /** * Finish the test and print log information to the unit testing console. @@ -1277,7 +1280,7 @@ export interface AbilityDelegator { * The total length of the log information to be printed cannot exceed 1000 characters. * * @param { string } msg - Log information. - * @param { number } code - Result code. + * @param { int } code - Result code. * @param { AsyncCallback } callback - The callback of finishTest. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @throws { BusinessError } 16000100 - Calling FinishTest failed. @@ -1287,7 +1290,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - finishTest(msg: string, code: number, callback: AsyncCallback): void; + finishTest(msg: string, code: int, callback: AsyncCallback): void; /** * Finish the test and print log information to the unit testing console. @@ -1319,7 +1322,7 @@ export interface AbilityDelegator { * The total length of the log information to be printed cannot exceed 1000 characters. * * @param { string } msg - Log information. - * @param { number } code - Result code. + * @param { int } code - Result code. * @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. * @throws { BusinessError } 16000100 - Calling FinishTest failed. @@ -1329,7 +1332,7 @@ export interface AbilityDelegator { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - finishTest(msg: string, code: number): Promise; + finishTest(msg: string, code: int): Promise; /** * Used to set a list of mock data. diff --git a/api/application/AbilityRunningInfo.d.ts b/api/application/AbilityRunningInfo.d.ts index 26f2e165620452c943745c24aaae6e93003e58f4..60fd2645fa5d4912f6ff52e7ff65ceaf5dae9e6a 100644 --- a/api/application/AbilityRunningInfo.d.ts +++ b/api/application/AbilityRunningInfo.d.ts @@ -18,6 +18,9 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ import { ElementName } from '../bundleManager/ElementName'; import abilityManager from '../@ohos.app.ability.abilityManager'; @@ -52,24 +55,24 @@ export interface AbilityRunningInfo { /** * Process ID. * - * @type { number } + * @type { int } * @default process id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** * User ID. * - * @type { number } + * @type { int } * @default user id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * Process name. @@ -85,13 +88,13 @@ export interface AbilityRunningInfo { /** * Ability startup time. * - * @type { number } + * @type { int } * @default ability start time * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - startTime: number; + startTime: int; /** * Ability status. diff --git a/api/application/AbilityStateData.d.ts b/api/application/AbilityStateData.d.ts index 2512f35105b7a5c854783ab7b64c1d54e145d38c..52caee98da72141ba5ec55d05cc65a50911d9831 100644 --- a/api/application/AbilityStateData.d.ts +++ b/api/application/AbilityStateData.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + /** * The ability or extension state data. * @@ -59,42 +63,42 @@ declare class AbilityStateData { /** * The pid. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** * 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; /** * The ability type, page or service and so on. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - abilityType: number; + abilityType: int; /** * Indicates whether the application is atomic service. @@ -108,12 +112,12 @@ declare class AbilityStateData { /** * The app clone index of ability instance. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - appCloneIndex?: number; + appCloneIndex?: int; } export default AbilityStateData; \ No newline at end of file diff --git a/api/application/AppStateData.d.ts b/api/application/AppStateData.d.ts index 8031f673551360f0a4d8343a9d9962736a0f0a79..6fbd2c1ba952fb9ea4d44f1f0bf210c39775859c 100644 --- a/api/application/AppStateData.d.ts +++ b/api/application/AppStateData.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + /** * The application state data. * @@ -39,22 +43,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. diff --git a/api/application/ApplicationContext.d.ts b/api/application/ApplicationContext.d.ts index b8737bdb8893ca215671c23856846c873e6bb502..39796dc7cfefe7e89b0dae7d1faba6a0d460ce81 100644 --- a/api/application/ApplicationContext.d.ts +++ b/api/application/ApplicationContext.d.ts @@ -19,6 +19,7 @@ */ /*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' import AbilityLifecycleCallback from '../@ohos.app.ability.AbilityLifecycleCallback'; import EnvironmentCallback from '../@ohos.app.ability.EnvironmentCallback'; import type ApplicationStateChangeCallback from '../@ohos.app.ability.ApplicationStateChangeCallback'; @@ -188,14 +189,14 @@ declare class ApplicationContext extends Context { * * @param { 'environment' } type - environment. * @param { EnvironmentCallback } callback - The environment callback. - * @returns { number } Returns the number code of the callback. + * @returns { int } Returns the number code of the callback. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since 11 */ - on(type: 'environment', callback: EnvironmentCallback): number; + on(type: 'environment', callback: EnvironmentCallback): int; /** * Unregister environment callback. @@ -212,7 +213,7 @@ declare class ApplicationContext extends Context { * Unregister environment callback. * * @param { 'environment' } type - environment. - * @param { number } callbackId - Indicates the number code of the callback. + * @param { int } callbackId - Indicates the number code of the callback. * @param { AsyncCallback } callback - The callback of unregisterEnvironmentCallback. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -220,7 +221,7 @@ declare class ApplicationContext extends Context { * @atomicservice * @since 11 */ - off(type: 'environment', callbackId: number, callback: AsyncCallback): void; + off(type: 'environment', callbackId: int, callback: AsyncCallback): void; /** * Unregister environment callback. @@ -237,7 +238,7 @@ declare class ApplicationContext extends Context { * Unregister environment callback. * * @param { 'environment' } type - environment. - * @param { number } callbackId - Indicates the number code of the callback. + * @param { int } callbackId - Indicates the number code of the callback. * @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. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -245,7 +246,7 @@ declare class ApplicationContext extends Context { * @atomicservice * @since 11 */ - off(type: 'environment', callbackId: number): Promise; + off(type: 'environment', callbackId: int): Promise; /** * Register applicationStateChange callback. @@ -622,7 +623,7 @@ declare class ApplicationContext extends Context { /** * Set font size scale. - * @param {number} fontSizeScale - Font size scale. + * @param {double} fontSizeScale - Font size scale. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly @@ -630,7 +631,7 @@ declare class ApplicationContext extends Context { * @since arkts {'1.1':'13', '1.2':'20'} * @arkts 1.1&1.2 */ - setFontSizeScale(fontSizeScale: number): void; + setFontSizeScale(fontSizeScale: double): void; /** * Get current app key of current running app instance. diff --git a/api/application/ExtensionRunningInfo.d.ts b/api/application/ExtensionRunningInfo.d.ts index 7b6bdaaf403b517ad5aefa9835eda426f25628a9..21d4271e4de3ecb0fc65e4c39a4dc22860b4c6ad 100644 --- a/api/application/ExtensionRunningInfo.d.ts +++ b/api/application/ExtensionRunningInfo.d.ts @@ -18,6 +18,9 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ import { ElementName } from '../bundleManager/ElementName'; import bundle from '../@ohos.bundle.bundleManager'; @@ -42,24 +45,24 @@ export interface ExtensionRunningInfo { extension: ElementName; /** - * @type { number } + * @type { int } * @default process id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** - * @type { number } + * @type { int } * @default user id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * @type { string } @@ -72,14 +75,14 @@ export interface ExtensionRunningInfo { processName: string; /** - * @type { number } + * @type { int } * @default ability start time * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - startTime: number; + startTime: int; /** * @type { Array } diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts index eb9818d60ccd02cb88dcb18c2a3542cbc214c3fb..01b5b42bfa532fa8b21471e4b47a5124e72b1d7e 100644 --- a/api/application/ProcessData.d.ts +++ b/api/application/ProcessData.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + /** * The process data. * @@ -38,29 +42,29 @@ declare class ProcessData { /** * The pid. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 14 */ - pid: number; + pid: int; /** * The uid. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 14 */ - uid: number; + uid: int; /** * The process state. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 14 */ - state: number; + state: int; /** * Whether the process is continuous task. diff --git a/api/application/ProcessInformation.d.ts b/api/application/ProcessInformation.d.ts index 8a7320f6602b116a2e96bf756f737320df5a97c9..223f639a90303df75e85c8a4d8d544eaac5b7355 100644 --- a/api/application/ProcessInformation.d.ts +++ b/api/application/ProcessInformation.d.ts @@ -18,6 +18,7 @@ * @kit AbilityKit */ /*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' import type appManager from '../@ohos.app.ability.appManager'; /*** endif */ /*** if arkts 1.2 */ @@ -66,7 +67,7 @@ export interface ProcessInformation { * @since 10 */ /** - * @type { number } + * @type { int } * @default process id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform @@ -74,7 +75,7 @@ export interface ProcessInformation { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** * @type { number } @@ -83,14 +84,14 @@ export interface ProcessInformation { * @since 9 */ /** - * @type { number } + * @type { int } * @default user id * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * @type { string } @@ -173,11 +174,11 @@ export interface ProcessInformation { /** * The app clone index of current process if app is multi app mode. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - appCloneIndex?: number; + appCloneIndex?: int; } diff --git a/api/application/RunningAppClone.d.ts b/api/application/RunningAppClone.d.ts index 261cb1d15ab7804913898229678934892a6b2597..1e7c077bd330d61533ebe4511d69fb1df507e645 100644 --- a/api/application/RunningAppClone.d.ts +++ b/api/application/RunningAppClone.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + /** * The class of single running app information. * @@ -31,33 +35,33 @@ export interface RunningAppClone { /** * The app clone index of current single app. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - appCloneIndex: number; + appCloneIndex: int; /** * The uid of current single app. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * All pids of current single app. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - pids: Array; + pids: Array; } \ No newline at end of file diff --git a/api/application/shellCmdResult.d.ts b/api/application/shellCmdResult.d.ts index 135dce75c4e447ea49b021835b44cb22b80379ba..40454433d7c5e172364340800248e6802c83a61c 100644 --- a/api/application/shellCmdResult.d.ts +++ b/api/application/shellCmdResult.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + /** * A object that records the result of shell command executes. * @@ -63,13 +67,13 @@ export interface ShellCmdResult { /** * shell cmd exec result. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - exitCode: number; + exitCode: int; } /*** if arkts 1.1 */ diff --git a/api/wantAgent/triggerInfo.d.ts b/api/wantAgent/triggerInfo.d.ts index b487d2f2f71243fbd1058d6a5f915983b9cd1f20..7f9e5c649d81e8e38c86806ca13a4d6abd2f57a6 100644 --- a/api/wantAgent/triggerInfo.d.ts +++ b/api/wantAgent/triggerInfo.d.ts @@ -18,6 +18,10 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' +/*** endif */ + import Want from '../@ohos.app.ability.Want'; import StartOptions from '../@ohos.app.ability.StartOptions'; @@ -48,13 +52,13 @@ export interface TriggerInfo { /** * Result code. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - code: number; + code: int; /** * Extra Want. diff --git a/api/wantAgent/wantAgentInfo.d.ts b/api/wantAgent/wantAgentInfo.d.ts index aa745ca9e4e487785ff780fe1a0ff5e62a157d6b..64722f0b0cd40bfdd16518356ca818fb6ff26930 100644 --- a/api/wantAgent/wantAgentInfo.d.ts +++ b/api/wantAgent/wantAgentInfo.d.ts @@ -21,6 +21,7 @@ import Want from '../@ohos.app.ability.Want'; import type abilityWantAgent from '../@ohos.app.ability.wantAgent'; /*** if arkts 1.1 */ +import { int , double } from '../@ohos.base' import wantAgent from '../@ohos.wantAgent'; /*** endif */ @@ -108,13 +109,13 @@ export interface WantAgentInfo { /** * Request code defined by the user. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - requestCode: number; + requestCode: int; /** * An array of flags for using the WantAgent.