You need to sign in or sign up before continuing.
未验证 提交 c11cc191 编写于 作者: O openharmony_ci 提交者: Gitee

!16129 【轻量级 PR】:15647+15863+15443 update js-apis-util.md + readme

Merge pull request !16129 from wusongqing/N/A
......@@ -27,7 +27,7 @@ Prints the input content in a formatted string.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| format | string | Yes| Format of the string to print.|
| ...args | Object[] | No| Data to format.|
| ...args | Object[] | No| Values to format. The formatted values will replace the wildcard in the string. If this parameter is not set, the first parameter is returned by default.|
**Return value**
| Type| Description|
......@@ -88,14 +88,14 @@ Calls back an asynchronous function. In the callback, the first parameter indica
**Example**
```js
async function promiseFn() {
return Promise.reject('value');
}
var cb = util.callbackWrapper(promiseFn);
cb((err, ret) => {
console.log(err);
console.log(ret);
})
async function fn() {
return 'hello world';
}
let cb = util.callbackWrapper(fn);
cb(1, (err, ret) => {
if (err) throw err;
console.log(ret);
});
```
......
# Task Management
# Background Task Management
- Background Task Management
- Background Task
- [Background Task Management Overview](background-task-overview.md)
- [Background Task Management Development](background-task-dev-guide.md)
- Work Scheduler
- [Work Scheduler Overview](work-scheduler-overview.md)
- [Work Scheduler Development](work-scheduler-dev-guide.md)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册