- Learn React with TypeScript 3
- Carl Rippon
- 62字
- 2021-06-10 19:16:37
Default exports
We can specify a single item that can be exported by default using the default keyword:
export default interface {
name: string;
unitPrice: number;
}
Notice that we don't need to name the interface. We can then import a default exported item using an import statement without the curly braces with a name of our choice:
import Product from "./product";
推薦閱讀
- ASP.NET Web API:Build RESTful web applications and services on the .NET framework
- 自制編譯器
- 深入淺出Java虛擬機:JVM原理與實戰
- C語言程序設計基礎與實驗指導
- MySQL 8 DBA基礎教程
- 從0到1:HTML+CSS快速上手
- 小學生C++創意編程(視頻教學版)
- Kotlin編程實戰:創建優雅、富于表現力和高性能的JVM與Android應用程序
- MySQL程序員面試筆試寶典
- Hadoop大數據分析技術
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- 石墨烯改性塑料
- Visual Basic程序設計實驗指導及考試指南
- Daniel Arbuckle's Mastering Python
- 小小的Python編程故事