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

Modules

TypeScript also supports modules As we deal with a large number of external JavaScript libraries, this modularity will really help us organize our code. Using the import statement, we can import modules as follows:

Import { inv } from "./Inventory"; 
var p = new inv.Product('mobile', 101); 

Here, we just imported the previously created module, Inventory, created an instance of Product and assigned it to the variable p.

主站蜘蛛池模板: 化州市| 商洛市| 安丘市| 阿坝县| 岳阳市| 新巴尔虎右旗| 深圳市| 郯城县| 普陀区| 湘阴县| 营口市| 浪卡子县| 凌云县| 廊坊市| 大埔县| 盘锦市| 长沙市| 麻栗坡县| 东港市| 永昌县| 泽库县| 江阴市| 泸溪县| 嘉义市| 潮安县| 通州市| 阿鲁科尔沁旗| 衡南县| 城口县| 眉山市| 营山县| 阿坝县| 铅山县| 社旗县| 鄱阳县| 卓资县| 江华| 彰武县| 嘉义市| 白城市| 唐海县|