From f82b63f36f25c4cf00a7efe9c4d05c7a5590ae10 Mon Sep 17 00:00:00 2001 From: shikai-123 Date: Mon, 4 Jul 2022 12:36:50 +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: zhoufei --- 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