diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md index c85b447f4b4f38ca40d39b7c290654816e2af2d3..43cefdea82f00f941d1f57e12bca63ce516cb7ef 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md @@ -69,7 +69,7 @@ get(key: string, callback: AsyncCallback<string>): void import { BusinessError } from '@ohos.base'; try { - systemparameter.get("const.ohos.apiversion", (err:BusinessError, data:string) => { + systemparameter.get("const.ohos.apiversion", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -102,7 +102,7 @@ get(key: string, def: string, callback: AsyncCallback<string>): void import { BusinessError } from '@ohos.base'; try { - systemparameter.get("const.ohos.apiversion", "default", (err:BusinessError, data:string) => { + systemparameter.get("const.ohos.apiversion", "default", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -142,9 +142,9 @@ import { BusinessError } from '@ohos.base'; try { let p = systemparameter.get("const.ohos.apiversion"); - p.then((value:string) => { + p.then((value: string) => { console.log("get test.parameter.key success: " + value); - }).catch((err:BusinessError) => { + }).catch((err: BusinessError) => { console.log("get test.parameter.key error: " + err.code); }); } catch(e) { @@ -208,7 +208,7 @@ set(key: string, value: string, callback: AsyncCallback<void>): void import { BusinessError } from '@ohos.base'; try { - systemparameter.set("test.parameter.key", "testValue", (err:BusinessError, data:string) =>{ + systemparameter.set("test.parameter.key", "testValue", (err: BusinessError, data: void) =>{ if (err == undefined) { console.log("set test.parameter.key value success :" + data) } else { @@ -251,9 +251,9 @@ import { BusinessError } from '@ohos.base'; try { let p = systemparameter.set("test.parameter.key", "testValue"); - p.then((value:string) => { + p.then((value: void) => { console.log("set test.parameter.key success: " + value); - }).catch((err:BusinessError) => { + }).catch((err: BusinessError) => { console.log(" set test.parameter.key error: " + err.code); }); } catch(e) { diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md b/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md index 9ee0568cccc3d95b42867ebfbc880744638b2743..6a26247644f0768fdd8d589e2921f8907c399118 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-parameterEnhance.md @@ -69,7 +69,7 @@ get(key: string, callback: AsyncCallback<string>): void import { BusinessError } from '@ohos.base'; try { - systemparameter.get("const.ohos.apiversion", (err:BusinessError, data:string) => { + systemparameter.get("const.ohos.apiversion", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -102,7 +102,7 @@ get(key: string, def: string, callback: AsyncCallback<string>): void import { BusinessError } from '@ohos.base'; try { - systemparameter.get("const.ohos.apiversion", "default", (err:BusinessError, data:string) => { + systemparameter.get("const.ohos.apiversion", "default", (err: BusinessError, data: string) => { if (err == undefined) { console.log("get test.parameter.key value success:" + data) } else { @@ -142,9 +142,9 @@ import { BusinessError } from '@ohos.base'; try { let p = systemparameter.get("const.ohos.apiversion"); - p.then((value:string) => { + p.then((value: string) => { console.log("get test.parameter.key success: " + value); - }).catch((err:BusinessError) => { + }).catch((err: BusinessError) => { console.log("get test.parameter.key error: " + err.code); }); } catch(e) { @@ -201,7 +201,7 @@ set(key: string, value: string, callback: AsyncCallback<void>): void import { BusinessError } from '@ohos.base'; try { - systemparameter.set("test.parameter.key", "testValue", (err:BusinessError, data:string) => { + systemparameter.set("test.parameter.key", "testValue", (err: BusinessError, data: void) => { if (err == undefined) { console.log("set test.parameter.key value success :" + data) } else { @@ -240,9 +240,9 @@ import { BusinessError } from '@ohos.base'; try { let p = systemparameter.set("test.parameter.key", "testValue"); - p.then((value:string) => { + p.then((value: void) => { console.log("set test.parameter.key success: " + value); - }).catch((err:BusinessError) => { + }).catch((err: BusinessError) => { console.log(" set test.parameter.key error: " + err.code); }); } catch(e) {