常用工具类
| 名称 | 用法 | 备注 |
|---|---|---|
| Partial | Partial<Point> | 将对象中的所有属性改为可选 |
| Required | Required<Car> | 将对象中的所有属性改为必选 |
| Record | Record<string, number> | 定义对象的键值类型 |
| Omit | `Omit<Person, 'age' | 'location'>` |
| Pick | Pick<Person, 'name'> | 从对象类型中只保留若干键 |
| Exclude | Exclude<Primitive, string> | 从联合中删除若干类型 |
| ReturnType | ReturnType<PointGenerator> | 提取函数类型的返回类型 |
| Parameters | Parameters<PointPrinter> | 提取函数类型的参数类型,返回一个数组 |
| Readonly | Readonly<Person> | 创建一个新类型,其中所有属性都是只读的 |