Intersection Type
↔ Compound Type to merge via &
Type Operator to express Type as being ALL of Type set
aka Type-Intersection, Intersection
Intersection Type related to interface
Inheritance
type A = {name: string; age: number}
type B = {name: string; hobby: string}
type C = A & B
References
- [
!snippet [**_
Intersection Type_**](intersection-type) of 2 [
Union Type`](union-type)
type DateTime = Date | string
type Label = string | number
type Combined = DateTime & Label
typeof Combined`](snippet-intersection-type-of-2-union-type-typeof-combined) ↔ string