- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 60字
- 2021-07-15 17:05:31
Extending interfaces
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.
推薦閱讀
- C及C++程序設計(第4版)
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- R語言經典實例(原書第2版)
- Docker進階與實戰
- 圖解Java數據結構與算法(微課視頻版)
- Python編程:從入門到實踐
- Instant Ext.NET Application Development
- Python爬蟲、數據分析與可視化:工具詳解與案例實戰
- OpenStack Networking Essentials
- 零基礎學Python編程(少兒趣味版)
- Spring 5 Design Patterns
- Python開發基礎
- Scratch從入門到精通
- Mastering ASP.NET Core 2.0
- Building a Media Center with Raspberry Pi