diff --git a/en/application-dev/reference/apis/js-apis-device-info.md b/en/application-dev/reference/apis/js-apis-device-info.md index 3c1a3efd773b126a4ce9e7d371c2946ddada0cf6..0f5dd2a794e92690820f12d6ab8e82e9f6b3b340 100644 --- a/en/application-dev/reference/apis/js-apis-device-info.md +++ b/en/application-dev/reference/apis/js-apis-device-info.md @@ -5,7 +5,7 @@ ## Modules to Import -``` +```ts import deviceInfo from '@ohos.deviceInfo' ``` diff --git a/en/application-dev/reference/apis/js-apis-system-parameter.md b/en/application-dev/reference/apis/js-apis-system-parameter.md index 29c1e580b1e2ac03e9c0cb88922d3a640485d8bf..c111c6c2cbfa5e809816b3246a28ac8114e35f76 100644 --- a/en/application-dev/reference/apis/js-apis-system-parameter.md +++ b/en/application-dev/reference/apis/js-apis-system-parameter.md @@ -6,7 +6,7 @@ ## Modules to Import -``` +```ts import parameter from '@ohos.systemParameter' ``` @@ -34,7 +34,7 @@ Obtains the value of the attribute with the specified key. **Example** -``` +```ts try { var info = parameter.getSync("test.parameter.key"); console.log(JSON.stringify(info)); @@ -61,7 +61,7 @@ Obtains the value of the attribute with the specified key. This API uses an asyn **Example** -``` +```ts try { parameter.get("test.parameter.key", function (err, data) { if (err == undefined) { @@ -93,7 +93,7 @@ Obtains the value of the attribute with the specified key. This API uses an asyn **Example** -``` +```ts try { parameter.get("test.parameter.key", "default", function (err, data) { if (err == undefined) { @@ -131,7 +131,7 @@ Obtains the value of the attribute with the specified key. This API uses a promi **Example** -``` +```ts try { var p = parameter.get("test.parameter.key"); p.then(function (value) { @@ -162,7 +162,7 @@ Sets a value for the attribute with the specified key. **Example** -``` +```ts try { parameter.setSync("test.parameter.key", "default"); }catch(e){ @@ -189,7 +189,7 @@ Sets a value for the attribute with the specified key. This API uses an asynchro **Example** -``` +```ts try { parameter.set("test.parameter.key", "testValue", function (err, data) { if (err == undefined) { @@ -226,7 +226,7 @@ Sets a value for the attribute with the specified key. This API uses a promise t **Example** -``` +```ts try { var p = para.set("test.parameter.key", "testValue"); p.then(function (value) {