TypeScript 环境搭建:

TypeScript 环境搭建:
1、初始化package.json
npm init -y
2、初始化 tsc
tsc --init
产生 tsconfig.json 文件
3、ts运行环境
npm i webpack webpack-cli webpack-dev-sever -D
4、ts-loader 安装
npm i ts-loader typerscript -D
5、html-webpack-plugin 安装
npm i html-webpack-plugin -D
6、clean-webpack-plugin 安装
npm i clean-webpack-plugin -D
7、webpack-merge 安装
npm i webpack-merge -D
8、运行
npm start
9、打包
npm run build

10、typescript 语法提醒:
npm i typings -g 重启

原文地址:https://www.cnblogs.com/mikechang/p/13983454.html