Intersection Type
An Intersection Type takes two objects and creates a new object that combines the features of both objects.
Below is an example where we create an Intersection Type (ShapeProps
)
which combines all the properties defined for Square, Rectangle and Circle.
interface Square {
kind: "square";