tsconfig.json
{
/*
tsconfig.json
"include"用来指定哪些ts文件需要编译
路径:**表示任意目录 *表示任意文件
exclude:不想被编译的文件
默认值 node_module
*/
"include": [
"./src/**/*/"
],
"exclude": [
"./src/hello/**/*"
],
//编译器选项
"compilerOptions": {
//target用来指定ts被编译的版本,默认是ES3.ES6Next(最新版本)
"target": "ES6",
//module指定要使用的模块化规范
"module": "System",
//lib用来指定项目中要使用的库
// "lib": []
//outDir用来指定编译后的文件目录
"outDir": "./dist",
//将代码合并为一个文件
"outFile": "./dist/app.js",
//是否对js文件进行编译,默认是false
"allowJs": false,
//检查js代码是否符合语法规范,默认是false
"checkJs": false,
//是否溢出注释
"removeComments": false,
//不生成编译后的文件
"noEmit": false,
//当有错误的时候不生成编译后的文件
"noEmitOnError": false,
//设置当前代码是否开启严格模式
"alwaysStrict": false,
//不允许隐式的any类型
"noImplicitAny": false,
//不允许不明确的this
"noImplicitThis": false,
//严格的检查空值
"strictNullChecks": false
}
}