diff --git a/api/@ohos.util.d.ets b/api/@ohos.util.d.ets index 72a794baa4a330fc1507e7cfb06dfb8234b6d766..03b4f1def245d3aa08a6aeeee977d06fc47a7481 100644 --- a/api/@ohos.util.d.ets +++ b/api/@ohos.util.d.ets @@ -1442,6 +1442,19 @@ declare namespace util { isWeakSet(value: Object): boolean; } + /** + * 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. + * + * @param { Function } original - Asynchronous Function + * @returns { Function } Return a function that returns promises + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + */ + function promisify(original: Function): (...args: FixedArray) => Promise; + /** * Get the hash code of an object. *