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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.37.20