- Learn React with TypeScript 3
- Carl Rippon
- 71字
- 2021-06-10 19:16:34
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 {
...
}
推薦閱讀
- Mastering OpenLayers 3
- 數字媒體應用教程
- 摩登創客:與智能手機和平板電腦共舞
- STM32F0實戰:基于HAL庫開發
- Oracle BAM 11gR1 Handbook
- C語言程序設計
- WordPress 4.0 Site Blueprints(Second Edition)
- 青少年信息學競賽
- 常用工具軟件立體化教程(微課版)
- NetBeans IDE 8 Cookbook
- 從零開始學C#
- Building Wireless Sensor Networks Using Arduino
- Django 3.0入門與實踐
- OpenCV with Python By Example
- AMP:Building Accelerated Mobile Pages