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

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 {
...
}
主站蜘蛛池模板: 儋州市| 深州市| 华容县| 襄汾县| 枣阳市| 中牟县| 太和县| 富裕县| 兴隆县| 改则县| 夹江县| 图们市| 阿坝| 远安县| 太原市| 昂仁县| 莱西市| 民乐县| 宁化县| 同德县| 宁化县| 和硕县| 富锦市| 聂拉木县| 九江市| 马关县| 宜春市| 贡山| 吉林省| 秭归县| 广水市| 肥城市| 尚志市| 东阳市| 马山县| 菏泽市| 县级市| 商丘市| 尚义县| 南汇区| 汕头市|