官术网_书友最值得收藏!

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 {
...
}
主站蜘蛛池模板: 霍山县| 铜陵市| 银川市| 阿尔山市| 乌拉特前旗| 永登县| 三亚市| 苏尼特左旗| 于田县| 竹北市| 策勒县| 龙口市| 青阳县| 普洱| 松潘县| 新干县| 锡林郭勒盟| 麻阳| 开封县| 花莲县| 揭西县| 陈巴尔虎旗| 奇台县| 安塞县| 扬州市| 临夏县| 西峡县| 江安县| 三门县| 阿合奇县| 云安县| 昆明市| 正定县| 襄汾县| 沭阳县| 靖江市| 鱼台县| 新巴尔虎左旗| 武乡县| 吉水县| 偏关县|