提交 831b2881 编写于 作者: fxy060608's avatar fxy060608

Update literal.md

上级 81418b2a
......@@ -197,8 +197,8 @@ type User = {
function printUser(user: User){
console.log(user)
}
printUser({name: 'DCloud',age: 12} as User) // 通过对象字面量 as User 构造一个 type 定义的 User 对象
printUser({name: 'DCloud',age: 12}) // 从 HBuilderX 4.31+ 起,无需手动 as User
printUser({name: 'zhangsan',age: 12} as User) // 通过对象字面量 as User 构造一个 type 定义的 User 对象
printUser({name: 'zhangsan',age: 12}) // 从 HBuilderX 4.31+ 起,无需手动 as User
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册