From 9a8f7d1a1c6418cd9f92683d28dba65def08d5b7 Mon Sep 17 00:00:00 2001 From: shikai-123 Date: Fri, 24 Jun 2022 10:10:19 +0800 Subject: [PATCH] Modify the return value type of promisewrapper Change the return value from object to function issues: https://gitee.com/openharmony/js_util_module/issues/I5DVPV Signed-off-by: shikai-123 --- util/src/util_js.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/src/util_js.ts b/util/src/util_js.ts index ed9e43d..c3f91ac 100644 --- a/util/src/util_js.ts +++ b/util/src/util_js.ts @@ -441,7 +441,7 @@ function callbackWrapper(original : Fn) : void Object.defineProperties(cb, descriptors); } -function promiseWrapper(func : Function) : Object +function promiseWrapper(func : Function) : Function { return function (...args : Array) { return new Promise((resolve, reject) => { -- Gitee