- 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 {
...
}
推薦閱讀
- 流量的秘密:Google Analytics網(wǎng)站分析與優(yōu)化技巧(第2版)
- PaaS程序設計
- Learning RxJava
- 程序員面試筆試寶典
- INSTANT Weka How-to
- PLC編程及應用實戰(zhàn)
- 用Flutter極速構建原生應用
- 重學Java設計模式
- Learning DHTMLX Suite UI
- Apache Kafka Quick Start Guide
- PySide 6/PyQt 6快速開發(fā)與實戰(zhàn)
- UML2面向對象分析與設計(第2版)
- Java7程序設計入門經(jīng)典
- Mastering Gephi Network Visualization
- 軟件開發(fā)中的決策:權衡與取舍