Skip to content

Commit fdad7cd

Browse files
authored
Small fix
1 parent 732f3a2 commit fdad7cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_zh-cn/tour/type-inference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Seq(1, 3, 4).map(x => x * 2) // List(2, 6, 8)
6060

6161
## 何时 _不要_ 依赖类型推断
6262

63-
通常认为,公开可访问的 API 成员应该具有显示类型声明。 因此,我们建议你为将在你的代码中向用户公开的任何 API 明确指定类型。
63+
通常认为,公开可访问的 API 成员应该具有显示类型声明以增加可读性。 因此,我们建议你将代码中向用户公开的任何 API 明确指定类型。
6464

6565
此外,类型推断有时会推断出太具体的类型。 假设我们这么写:
6666

0 commit comments

Comments
 (0)