From 3a79cea3a787979b4ec07f609a56ee3c28a281b1 Mon Sep 17 00:00:00 2001 From: Fouckttt Date: Tue, 29 Jul 2025 17:29:13 +0800 Subject: [PATCH] JSDoc Test Issue:https://gitee.com/openharmony/interface_sdk-js/issues/ICPLBY Signed-off-by: Fouckttt --- .../js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets b/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets index d4d5f4373..1c5e9f766 100644 --- a/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets +++ b/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets @@ -561,7 +561,7 @@ export default namespace cloudSync { return promise; } - export function getFileSyncState(uri: Array): Promise> { + export function getFileSyncStateReturnsPromise(uri: Array): Promise> { let promise = new Promise>((resolve, reject) => { let promises = uri.map((v: string): Promise => {return getPromiseFileSyncState(v)}); Promise.all(promises).then((re: Array): void => { @@ -576,7 +576,7 @@ export default namespace cloudSync { return promise; } - export function getFileSyncState(uri: Array, callback: AsyncCallback>): void { + export function getFileSyncStateWithCallback(uri: Array, callback: AsyncCallback>): void { let promises = uri.map((v: string): Promise => {return getPromiseFileSyncState(v)}); Promise.all(promises).then((re: Array): void => { let res: Array = re.map((result: int) => { @@ -591,11 +591,13 @@ export default namespace cloudSync { }); } - export function getFileSyncState(uri: string): FileSyncState { + export function getFileSyncStateWithUri(uri: string): FileSyncState { let res: int = StaticFunction.getFileSyncStateInner(uri); return res as FileSyncState; } + export overload getFileSyncState { getFileSyncStateReturnsPromise, getFileSyncStateWithCallback, getFileSyncStateWithUri } + export function registerChange(uri: string, recursion: boolean, callback: Callback): void { StaticFunction.registerChangeInner(uri, recursion, callback); } -- Gitee