Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
af22e7bf
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
af22e7bf
编写于
7月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!7331 翻译完成:6587 Modify the return value type of promisewrapper
Merge pull request !7331 from wusongqing/TR6587
上级
102fe999
094c8381
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
8 deletion
+8
-8
en/application-dev/reference/apis/js-apis-util.md
en/application-dev/reference/apis/js-apis-util.md
+8
-8
未找到文件。
en/application-dev/reference/apis/js-apis-util.md
浏览文件 @
af22e7bf
...
...
@@ -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) =
>
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 | U
ni
t8Array | Yes| Uint8Array to decode.|
| input | U
in
t8Array | 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录