diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index ea00afe0705860e3a1e29303ec61239bb45005b1..f3f42ea249fa30585f6ce7c5218294bd8d5efef8 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -64,10 +64,21 @@ declare namespace util { */ function callbackWrapper(original: Function): (err: Object, value: Object) => void; + /** + * Takes a function following the common error-first callback style, i.e taking an (err, value) => + * callback as the last argument, and return a function that returns promises. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param original asynchronous function + * @return return a version that returns promises + */ + function promiseWrapper(original: (err: Object, value: Object) => void): Function; + /** * Takes a function following the common error-first callback style, i.e taking an (err, value) => * callback as the last argument, and return a version that returns promises. * @since 7 + * @deprecated since 9 * @syscap SystemCapability.Utils.Lang * @param original asynchronous function * @return return a version that returns promises