提交 67429bb3 编写于 作者: Y yichengzhao

mark language type

Signed-off-by: Nyichengzhao <yichengzhao1@huawei.com>
Change-Id: I2b6663ef20c6d916e30cab49041dc856107aad01
上级 e89a40b5
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
## 导入模块 ## 导入模块
``` ```ts
import deviceInfo from '@ohos.deviceInfo' import deviceInfo from '@ohos.deviceInfo'
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
## 导入模块 ## 导入模块
``` ```ts
import parameter from '@ohos.systemParameter' import parameter from '@ohos.systemParameter'
``` ```
...@@ -34,7 +34,7 @@ getSync(key: string, def?: string): string ...@@ -34,7 +34,7 @@ getSync(key: string, def?: string): string
**示例:** **示例:**
``` ```ts
try { try {
var info = parameter.getSync("test.parameter.key"); var info = parameter.getSync("test.parameter.key");
console.log(JSON.stringify(info)); console.log(JSON.stringify(info));
...@@ -61,7 +61,7 @@ get(key: string, callback: AsyncCallback&lt;string&gt;): void ...@@ -61,7 +61,7 @@ get(key: string, callback: AsyncCallback&lt;string&gt;): void
**示例:** **示例:**
``` ```ts
try { try {
parameter.get("test.parameter.key", function (err, data) { parameter.get("test.parameter.key", function (err, data) {
if (err == undefined) { if (err == undefined) {
...@@ -93,7 +93,7 @@ get(key: string, def: string, callback: AsyncCallback&lt;string&gt;): void ...@@ -93,7 +93,7 @@ get(key: string, def: string, callback: AsyncCallback&lt;string&gt;): void
**示例:** **示例:**
``` ```ts
try { try {
parameter.get("test.parameter.key", "default", function (err, data) { parameter.get("test.parameter.key", "default", function (err, data) {
if (err == undefined) { if (err == undefined) {
...@@ -131,7 +131,7 @@ get(key: string, def?: string): Promise&lt;string&gt; ...@@ -131,7 +131,7 @@ get(key: string, def?: string): Promise&lt;string&gt;
**示例:** **示例:**
``` ```ts
try { try {
var p = parameter.get("test.parameter.key"); var p = parameter.get("test.parameter.key");
p.then(function (value) { p.then(function (value) {
...@@ -162,7 +162,7 @@ setSync(key: string, value: string): void ...@@ -162,7 +162,7 @@ setSync(key: string, value: string): void
**示例:** **示例:**
``` ```ts
try { try {
parameter.setSync("test.parameter.key", "default"); parameter.setSync("test.parameter.key", "default");
}catch(e){ }catch(e){
...@@ -189,7 +189,7 @@ set(key: string, value: string, callback: AsyncCallback&lt;void&gt;): void ...@@ -189,7 +189,7 @@ set(key: string, value: string, callback: AsyncCallback&lt;void&gt;): void
**示例:** **示例:**
``` ```ts
try { try {
parameter.set("test.parameter.key", "testValue", function (err, data) { parameter.set("test.parameter.key", "testValue", function (err, data) {
if (err == undefined) { if (err == undefined) {
...@@ -226,7 +226,7 @@ set(key: string, def?: string): Promise&lt;string&gt; ...@@ -226,7 +226,7 @@ set(key: string, def?: string): Promise&lt;string&gt;
**示例:** **示例:**
``` ```ts
try { try {
var p = para.set("test.parameter.key", "testValue"); var p = para.set("test.parameter.key", "testValue");
p.then(function (value) { p.then(function (value) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册