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

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 {
...
}
主站蜘蛛池模板: 永泰县| 韶关市| 宣武区| 渝北区| 奇台县| 策勒县| 襄城县| 兴安盟| 遵义县| 兴安盟| 临澧县| 延安市| 赤城县| 宣恩县| 嘉黎县| 绥中县| 格尔木市| 长沙县| 阿鲁科尔沁旗| 龙泉市| 西充县| 德保县| 红原县| 深水埗区| 太仆寺旗| 镇赉县| 瓦房店市| 泰顺县| 资源县| 林周县| 江孜县| 陆丰市| 舞阳县| 曲麻莱县| 班戈县| 赣州市| 东海县| 柳林县| 海淀区| 湘阴县| 托克逊县|