- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 88字
- 2021-07-15 17:05:32
Hybrid type interfaces
Hybrid type interfaces are used when we want to use the object both as a function and an object. We can call an object like a function if it implements a hybrid type interface, or we can use it as an object and access its properties. This type of interface enables you to use an interface as an object and a function, as follows:
interface Customer { (name: string); name: string; deleteCustomer(id: number): void; } var c: Customer; c('Rajesh Gunasundaram'); c.name = 'Rajesh Gunasundaram'; c.deleteCustomer(101);
推薦閱讀
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- 從零構建知識圖譜:技術、方法與案例
- 數(shù)據(jù)庫原理及應用(Access版)第3版
- C# Programming Cookbook
- ASP.NET Core Essentials
- 高級C/C++編譯技術(典藏版)
- 零基礎入門學習Python
- Getting Started with Gulp
- HTML5從入門到精通 (第2版)
- Mastering Akka
- Raspberry Pi Robotic Blueprints
- 大學計算機基礎
- Java程序設計與項目案例教程
- 分布式數(shù)據(jù)庫原理、架構與實踐
- Python青少年趣味編程