You can also implement inheritance in interfaces.
Let's say we have another interface named and this is the interface which actually makes sure that we
have a name property.
So now a here in person we could implement readable and named to be forced to have both agreed method
and a name that is something we could do or if we know that agreeable things Greta all objects always
need to have a name.
We could make sure that this readable interface actually extends to named interface so that together
they form a new interface which forces every object based on the readable to have a grid method but
also to have a name and to do that we can add extends here on the interface as well and we extend named
now therefore as I said this forms a new interface which is in the end the interface that forces us
to have a great effort but not just yet.
It also forces us to have everything.
The named interface defines in this case a Name property.
So if a would remove name here I would already get an error because this class now incorrectly implements
the interface readable because the property name is missing.
So that's also how we can combine interfaces.
Why would we split an interface like this.
Well maybe you have an application where on some objects you only want to force them to have a name
and not agreed method.
Whereas on other objects you need both greet and name.
With this split this is possible some objects or some classes can just implement named and others can
implement reasonable and are forced to have both greet and the name.
So extending interfaces is possible.
And there you can also extend more than one so you can merge multiple interfaces into one single interface.
We could merge and no interface.
If we had it simply separated with a comma remembered at four classes this was not possible.
When you use classes and inheritance you can only inherit from one class you can't inherit from multiple
classes for interfaces that is different for interfaces you can indeed inherit from multiple interfaces.
Because in the end they're all just getting merged together.
And in this pure type of feature which is actually not translated to JavaScript as you will see we can
de offer for break the rules set up for JavaScript classes and extend multiple interfaces.