typescript

typescript node入门参考html

http://www.javashuo.com/article/p-numigcpg-dx.htmlvue

typescript vue入门参考node

http://www.javashuo.com/article/p-yiyczsls-ke.htmltypescript

全局安装typescript最近版本,tsc -v正常显示为安装成功json

打开当前项目,tsc --init,自动生成tsconfig.jsonsegmentfault

tsconfig.json详解

能够被忽略,这时编译器会使用默认值。在这里查看完整编辑项完整的列表。
"extends"继承配置
和属性指定一个文件glob匹配模式列表。(指定编译)
"files"包含指定文件列表。
"compilerOptions""include""exclude"
{  
   "extends": "./configs/base",
  "compilerOptions": {
    /* Basic Options */
    "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
    "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
    "outDir": "./public/", /* Redirect output structure to the directory. */
    "sourceMap": true,
    "strict": true,
    "esModuleInterop": true
  },
  "include": [
    "src/*.ts"
  ],
   "exclude": [
     "node_modules"
  ],
  "files":[
    "index.ts",
    "example.ts"
  ]
 
}
相关文章
相关标签/搜索