未验证 提交 5e62be56 编写于 作者: O openharmony_ci 提交者: Gitee

!23791 arkts语法整改 挑单

Merge pull request !23791 from coollixin/cherry-pick-1693818142
无相关合并请求
......@@ -139,7 +139,7 @@ struct Index {
.fontWeight(FontWeight.Bold)
.onClick(() => {
hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO);
let ret = entry.nativeCallArkTS((value)=>{return value * 2;});
let ret: number = entry.nativeCallArkTS((value: number)=>{return value * 2;});
hilog.info(0x0000, 'testTag', 'Test NAPI nativeCallArkTS ret = %{public}d', ret);
})
}
......
......@@ -80,8 +80,8 @@ insertFront(element: T): void
```ts
class C1 {
name: string
age: string
name: string = ""
age: string = ""
}
let deque: Deque<string | number | boolean | Array<number> | C1> = new Deque();
deque.insertFront("a");
......
......@@ -254,7 +254,18 @@ dir(dir?: Object): void
**示例:**
```js
let a = { foo: { bar: { baz: true } }};
class bar {
baz: boolean = true;
}
let b: bar = {baz: true}
class foo{
bar: bar = b;
}
let c: foo = {bar: b}
class c1{
foo: foo = c;
}
let a: c1 = {foo: c}
console.dir(a);
// Object: {"foo":{"bar":{"baz":true}}}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部