Extending interfaces

Just like in .NET, interfaces can extend one another:

interface Serializable {    serialize(): string;}interface PersistedCalculable extends Calculable, Serializable {    shouldSaveInHistory: boolean;}

In the preceding example, the PersistedCalculable interface extends two interfaces. In addition to its own members, it includes all the members defined in the extended interfaces, Calculable and Serializable.

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.