未验证 提交 181778cc 编写于 作者: O openharmony_ci 提交者: Gitee

!23373 ArkTS规范整改

Merge pull request !23373 from chenshixu1/master
......@@ -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) {
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册