Skip to content

Commit cdb21f2

Browse files
committed
chore: remove lock file
1 parent 7223ae9 commit cdb21f2

File tree

5 files changed

+13
-24929
lines changed

5 files changed

+13
-24929
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# IDE & Editor
22
/.idea/
33

4+
# lock file
5+
*lock
6+
7+
48
# Logs
59
logs
610
*.log

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1.0.0 (2020-09-20)
1+
# 1.0.0 (2020-09-21)
22

33

44
### Bug Fixes

docs/zh/generics/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
- 不必写多条函数重载, 冗长的联合类型声明, 增强代码的可读性
99
- 灵活控制类型之间的约束
1010

11+
## 泛型约束
12+
13+
有时候我们希望限制每个类型变量**接受的类型数量**, 这就是**泛型约束**
14+
15+
我们可以使用 `,` 号来分隔多种约束类型, 比如: `<T extends Length, Type2, Type3>`
16+
1117
## 常见的一些泛型变量含义
1218

1319
- T (Type): 表示一个 `TypeScript` 类型
@@ -60,3 +66,5 @@ function validator<T>(arg: T): T {
6066
[TypeScript Spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
6167

6268
[TypeScript进阶 之 重难点梳理](https://mp.weixin.qq.com/s/xWaVvh5lXG8Nb_U6bmJamw)
69+
70+
[一文读懂 TypeScript 泛型及应用( 7.8K字)](https://juejin.im/post/6844904184894980104)

0 commit comments

Comments
 (0)