From d9ea5570ab5205d8326e72230025dcf6ad8ed25f Mon Sep 17 00:00:00 2001 From: leo9001 Date: Tue, 1 Jul 2025 14:05:23 +0800 Subject: [PATCH] =?UTF-8?q?overload=E6=95=B4=E6=94=B9=20ets=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: https://gitee.com/openharmony/bundlemanager_bundle_framework/issues/ICJJUP?from=project-issue Signed-off-by: leo9001 --- .../@ohos.bundle.distributedBundleManager.ets | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets b/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets index 19515e8..3aed2a0 100644 --- a/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets +++ b/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets @@ -34,7 +34,7 @@ export default namespace distributedBundleManager { return elementNames; } - function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback): void { + function getRemoteAbilityInfo_chinast_1(elementName: ElementName, callback: AsyncCallback): void { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), ''); }; @@ -47,7 +47,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementName: ElementName): Promise { + function getRemoteAbilityInfo_chinast_2(elementName: ElementName): Promise { let p = new Promise((resolve: (remoteAbilityInfo: RemoteAbilityInfo) => void, reject: (error: BusinessError) => void) => { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), ''); @@ -63,7 +63,7 @@ export default namespace distributedBundleManager { return p; } - function getRemoteAbilityInfo(elementNames: Array, callback: AsyncCallback>): void { + function getRemoteAbilityInfo_chinast_3(elementNames: Array, callback: AsyncCallback>): void { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, ''); }; @@ -76,7 +76,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementNames: Array): Promise> { + function getRemoteAbilityInfo_chinast_4(elementNames: Array): Promise> { let p = new Promise>((resolve: (arrRemoteAbilityInfo: Array) => void, reject: (error: BusinessError) => void) => { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, ''); @@ -92,7 +92,7 @@ export default namespace distributedBundleManager { return p; } - function getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCallback): void { + function getRemoteAbilityInfo_chinast_5(elementName: ElementName, locale: string, callback: AsyncCallback): void { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), locale); }; @@ -105,7 +105,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise { + function getRemoteAbilityInfo_chinast_6(elementName: ElementName, locale: string): Promise { let p = new Promise((resolve: (remoteAbilityInfo: RemoteAbilityInfo) => void, reject: (error: BusinessError) => void) => { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), locale); @@ -121,7 +121,7 @@ export default namespace distributedBundleManager { return p; } - function getRemoteAbilityInfo(elementNames: Array, locale: string, callback: AsyncCallback>): void { + function getRemoteAbilityInfo_chinast_7(elementNames: Array, locale: string, callback: AsyncCallback>): void { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, locale); }; @@ -134,7 +134,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementNames: Array, locale: string): Promise> { + function getRemoteAbilityInfo_chinast_8(elementNames: Array, locale: string): Promise> { let p = new Promise>((resolve: (arrRemoteAbilityInfo: Array) => void, reject: (error: BusinessError) => void) => { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, locale); @@ -150,5 +150,8 @@ export default namespace distributedBundleManager { return p; } + overload getRemoteAbilityInfo { getRemoteAbilityInfo_chinast_1,getRemoteAbilityInfo_chinast_2,getRemoteAbilityInfo_chinast_3,getRemoteAbilityInfo_chinast_4, + getRemoteAbilityInfo_chinast_5,getRemoteAbilityInfo_chinast_6,getRemoteAbilityInfo_chinast_7,getRemoteAbilityInfo_chinast_8 } + export type RemoteAbilityInfo = _RemoteAbilityInfo; } -- Gitee