未验证 提交 af22e7bf 编写于 作者: O openharmony_ci 提交者: Gitee

!7331 翻译完成:6587 Modify the return value type of promisewrapper

Merge pull request !7331 from wusongqing/TR6587
......@@ -61,7 +61,7 @@ Obtains detailed information about a system error code.
**Example**
```js
var errnum = 10; // 10 is the system error code.
var errnum = 10; // 10 is a system error code.
var result = util.getErrorString(errnum);
console.log("result = " + result);
```
......@@ -104,14 +104,16 @@ Calls back an asynchronous function. In the callback, the first parameter indica
promiseWrapper(original: (err: Object, value: Object) => void): Object
> **Introduce**<br/>
> Deprecated starting from API version 9, it is recommended to use [util.promisify9 +] (\utilpromisify9) instead.
> **NOTE**
>
> This API is deprecated since API version 9. You are advised to use **[util.promisify9+](#utilpromisify9)** instead.
Processes an asynchronous function and returns a promise version.
**System capability**: SystemCapability.Utils.Lang
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| original | Function | Yes| Asynchronous function.|
......@@ -136,7 +138,7 @@ Processes an asynchronous function and returns a promise version.
promisify(original: (err: Object, value: Object) =&gt; void): Function
Processes an asynchronous function and returns a promise function.
Processes an asynchronous function and returns a promise.
**System capability**: SystemCapability.Utils.Lang
......@@ -148,7 +150,7 @@ Processes an asynchronous function and returns a promise function.
**Return value**
| Type| Description|
| -------- | -------- |
| Function | Function in the error-first style (that is, **(err, value) =>...** is called as the last parameter) and the promise version.|
| Function | Function in the error-first style (that is, **(err, value) =>...** is called as the last parameter) and the promise.|
**Example**
```js
......@@ -165,7 +167,6 @@ Processes an asynchronous function and returns a promise function.
})
```
## TextDecoder
### Attributes
......@@ -217,7 +218,7 @@ Decodes the input content.
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| input | Unit8Array | Yes| Uint8Array to decode.|
| input | Uint8Array | Yes| Uint8Array to decode.|
| options | Object | No| Options related to decoding.|
**Table 2** options
......@@ -982,7 +983,6 @@ Performs subsequent operations after a value is removed.
**Example**
```js
var arr = [];
var arr = [];
class ChildLruBuffer extends util.LruBuffer
{
constructor()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册