提交 b3f3e6f0 编写于 作者: H Hollokin

修改示例代码

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