- 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);
推薦閱讀
- Cocos2d-x游戲開發(fā):手把手教你Lua語言的編程方法
- Python語言程序設計
- 精通搜索分析
- 樂高機器人設計技巧:EV3結構設計與編程指導
- Windows Phone 7.5:Building Location-aware Applications
- C語言開發(fā)基礎教程(Dev-C++)(第2版)
- Java實戰(zhàn)(第2版)
- Scala for Machine Learning(Second Edition)
- 編程可以很簡單
- Beginning C++ Game Programming
- Unity 2018 Augmented Reality Projects
- PHP 8從入門到精通(視頻教學版)
- Building Business Websites with Squarespace 7(Second Edition)
- 超簡單:Photoshop+JavaScript+Python智能修圖與圖像自動化處理
- 黑莓(BlackBerry)開發(fā)從入門到精通