From d4a527032bebd4862b0841749df529d04a56b1e4 Mon Sep 17 00:00:00 2001 From: chenshixu1 Date: Tue, 29 Aug 2023 07:40:06 +0000 Subject: [PATCH] fix paras Signed-off-by: chenshixu1 --- .../reference/apis/js-apis-system-parameter.md | 14 +++++++------- .../apis/js-apis-system-parameterEnhance.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) 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 c85b447f4b..43cefdea82 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 3457a2e4f6..c39bb3885c 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 @@ -68,7 +68,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 { @@ -101,7 +101,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 { @@ -141,9 +141,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) { @@ -200,7 +200,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 { @@ -239,9 +239,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) { -- GitLab