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

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 {
...
}
主站蜘蛛池模板: 麻阳| 右玉县| 彝良县| 蒲江县| 谷城县| 荣成市| 渝中区| 沾益县| 珠海市| 兴山县| 乌审旗| 乌什县| 南平市| 鹿泉市| 梁平县| 盘山县| 额尔古纳市| 兰溪市| 怀来县| 韶关市| 新营市| 来安县| 会东县| 玉龙| 诸城市| 太保市| 泗阳县| 沾益县| 甘肃省| 都安| 江北区| 师宗县| 措勤县| 锦州市| 遂川县| 仙桃市| 普安县| 科尔| 布尔津县| 荃湾区| 沙湾县|