tsconfig.json

{
  "compilerOptions": {
    "module": "es2015",
    "target": "es2015",
    "sourceMap": true,
    //用来指定编译后的文件所在的目录
    "outDir": "./dist",
    //将代码合并为一个文件
    //"outFile": "./dist/app.js",
    //是否对js文件进行编译,默认false
    "allowJs": true,
    //是否对js代码进行语法贵发检查,默认false
    "checkJs": true,
    //是否移除注释
    "removeComments": false,
    //不生成编译后的文件
    "noEmit": false,
    //当有错误时不生成编译后的文件
    "noEmitOnError": true,
    //所有严格检查的总开关
    "strict": true,
    //用来设置编译后的文件是否使用严格模式,默认false
    "alwaysStrict": true,
    //不允许隐式的any类型
    "noImplicitAny": true,
    //不允许不明确类型的this
    "noImplicitThis": true,
    //严格的检查空值
    "strictNullChecks": true
  },
  "include": [
    "./ts/**/*"
  ],
  "exclude": [
    "node_modules"
  ]
}

posted @ 2022-07-27 17:11  亦茫茫  阅读(21)  评论(0编辑  收藏  举报