提交 9d469c27 编写于 作者: X xinking129

fix sample format

Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 cc11c5c6
...@@ -606,7 +606,6 @@ setStaticSubscribeEventState(enable: boolean, callback: AsyncCallback<void>): vo ...@@ -606,7 +606,6 @@ setStaticSubscribeEventState(enable: boolean, callback: AsyncCallback<void>): vo
```ts ```ts
import CommonEventManager from '@ohos.commonEventManager'
CommonEventManager.setStaticSubscribeEventState(true, (err) => { CommonEventManager.setStaticSubscribeEventState(true, (err) => {
if (err.code) { if (err.code) {
console.info(`Set static subscribe event state callback failed, errCode: ${err.code}, errMes: ${err.message}`); console.info(`Set static subscribe event state callback failed, errCode: ${err.code}, errMes: ${err.message}`);
...@@ -652,7 +651,6 @@ setStaticSubscribeEventState(enable: boolean): Promise<void>; ...@@ -652,7 +651,6 @@ setStaticSubscribeEventState(enable: boolean): Promise<void>;
```ts ```ts
import CommonEventManager from '@ohos.commonEventManager'
CommonEventManager.setStaticSubscribeEventState(false).then(() => { CommonEventManager.setStaticSubscribeEventState(false).then(() => {
console.info(`Set static subscribe event state promise success`); console.info(`Set static subscribe event state promise success`);
}).catch ((err) => { }).catch ((err) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册