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

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 {
...
}
主站蜘蛛池模板: 遂宁市| 进贤县| 南通市| 龙口市| 封开县| 广安市| 梁河县| 河源市| 云浮市| 石屏县| 甘泉县| 永寿县| 黄龙县| 拉孜县| 荣昌县| 泰宁县| 沧州市| 仲巴县| 许昌市| 吉安县| 喀喇| 绥德县| 海口市| 嵊泗县| 梨树县| 太白县| 澄迈县| 乌审旗| 宜章县| 新绛县| 襄樊市| 互助| 晋江市| 遵义市| 固阳县| 漳浦县| 兴国县| 彭山县| 泊头市| 德清县| 城口县|