July 2017
Intermediate to advanced
454 pages
10h 1m
English
Interfaces can be extended. Extending an interface makes it share the properties of another interface, as follows:
interface Manager {
hasPower: boolean;
}
interface Employee extends Manager {
name: string;
}
var employee = <Employee>{};
employee.name = "Rajesh Gunasundaram";
employee.hasPower = true;
Here, the Employee interface extends the Manager interface and shares its hasPower with the Employee interface.
Read now
Unlock full access