- Learn React with TypeScript 3
- Carl Rippon
- 71字
- 2021-06-10 19:16:34
Interfaces
An interface is a contract that defines a type with a collection of property and method definitions without any implementation. Interfaces don't exist in JavaScript, so they are purely used by the TypeScript compiler to enforce the contract by type checking.
We create an interface with the interface keyword, followed by its name, followed by the bits that make up the interface in curly braces:
interface Product {
...
}
推薦閱讀
- 新編Visual Basic程序設計上機實驗教程
- 機器學習系統:設計和實現
- C語言程序設計(第3版)
- 摩登創客:與智能手機和平板電腦共舞
- Pandas Cookbook
- Mastering Ember.js
- Architecting the Industrial Internet
- Neo4j Essentials
- 深入淺出Android Jetpack
- Python數據可視化之Matplotlib與Pyecharts實戰
- 深入理解Android:Wi-Fi、NFC和GPS卷
- Learning OpenCV 3 Computer Vision with Python(Second Edition)
- Django實戰:Python Web典型模塊與項目開發
- JavaScript程序設計:基礎·PHP·XML
- MongoDB Cookbook(Second Edition)