提交 b3f3e6f0 编写于 作者: H Hollokin

修改示例代码

Signed-off-by: NHollokin <taoyuxin2@huawei.com>
上级 95c2e18f
...@@ -44,8 +44,8 @@ destroy(callback: AsyncCallback\<void>): void ...@@ -44,8 +44,8 @@ destroy(callback: AsyncCallback\<void>): void
**示例:** **示例:**
```js ```js
this.context.destroy((err) => { this.context.destroy(() => {
console.log('destroy result:' + JSON.stringify(err)); console.log('Succeeded in destroying context.');
}); });
``` ```
...@@ -67,8 +67,6 @@ destroy(): Promise\<void>; ...@@ -67,8 +67,6 @@ destroy(): Promise\<void>;
```js ```js
this.context.destroy().then(() => { this.context.destroy().then(() => {
console.log('Succeed in destoring context.'); console.log('Succeed in destroying context.');
}).catch((error) => {
console.log('Failed to destory context: ' + JSON.stringify(error));
}); });
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册