Open hushicai opened 5 years ago
distributive conditional type
Conditional types in which the checked type is a naked type parameter are called distributive conditional types.
例如:
(A | B | C) extends U ? X : Y
等价于
(A extends U ? X : Y) | (B extends U ? X : Y) | (C extends U ? X : Y)
满足分配律。
更多内容参考 Microsoft/TypeScript#21316
bivarianceHack
Microsoft/TypeScript#18654
TypeScript体系调研报告