mirror of
https://github.com/wangdoc/typescript-tutorial.git
synced 2025-12-20 00:50:17 +08:00
fix: fix typo
变量 `value` => 变量 `x`
This commit is contained in:
@@ -97,7 +97,7 @@ x = 42; // 正确
|
||||
x = 'Hello World'; // 正确
|
||||
```
|
||||
|
||||
上面示例中,变量`value`的类型是`unknown`,可以赋值为各种类型的值。这与`any`的行为一致。
|
||||
上面示例中,变量`x`的类型是`unknown`,可以赋值为各种类型的值。这与`any`的行为一致。
|
||||
|
||||
`unknown`类型跟`any`类型的不同之处在于,它不能直接使用。主要有以下几个限制。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user