From 831b2881635ff5a7ff2031684d9755b255270681 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Mon, 14 Oct 2024 15:46:54 +0800 Subject: [PATCH] Update literal.md --- docs/uts/literal.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/uts/literal.md b/docs/uts/literal.md index ba86dfd7..0148146c 100644 --- a/docs/uts/literal.md +++ b/docs/uts/literal.md @@ -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 ``` -- GitLab