November 2019
Beginner
804 pages
20h 1m
English
Just like classes, you can use the extends keyword to extend an existing interface, adding method signatures and properties to it. This is, of course, interesting when creating higher-level abstractions and specialized interfaces for your APIs.
Here's an example:
interface Club {
name: string;
logoLocation: string;
isActive(): boolean;
}
interface SoccerClub extends Club {
league: string;
}
Read now
Unlock full access