mirror of
https://github.com/wangdoc/typescript-tutorial.git
synced 2025-12-20 00:50:17 +08:00
docs(operator): fixed #101
This commit is contained in:
@@ -588,7 +588,7 @@ type Greeting = `hello ${World}`;
|
||||
|
||||
上面示例中,类型`Greeting`是一个模板字符串,里面引用了另一个字符串类型`world`,因此`Greeting`实际上是字符串`hello world`。
|
||||
|
||||
注意,模板字符串可以引用的类型一共6种,分别是 string、number、bigint、boolean、null、undefined。引用这6种以外的类型会报错。
|
||||
注意,模板字符串可以引用的类型一共7种,分别是 string、number、bigint、boolean、null、undefined、Enum。引用这7种以外的类型会报错。
|
||||
|
||||
```typescript
|
||||
type Num = 123;
|
||||
|
||||
Reference in New Issue
Block a user