todo
ts 中如何枚举联合类型的 key?
type Name = { name: string }
type Age = { age: number }
type Union = Name | Age
type UnionKey<P> = P extends infer P ? keyof P : never
type T = UnionKey<Union>
实现 UnionToIntersection
https://callanbi.top/post/dang-ts-de-lian-he-lei-xing-he-jiao-cha-lei-xing-yu-dao-han-shu/
自实现
https://juejin.cn/post/6994102811218673700
https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
Exclude<T, U> 从 T 中排除出可分配给 U的元素。
Omit<T, K> 的作用是忽略T中的某些属性。
Merge<O1, O2> 是将两个对象的属性合并。
Compute<A & B> 是将交叉类型合并
Intersection<T, U>的作用是取T的属性,此属性同样也存在与U。
Overwrite<T, U> 是用U的属性覆盖T的相同属性。
实现 Promise.all 之类
Promise.all settle