typescript

typescript node入门参考

https://segmentfault.com/a/1190000007574276

typescript vue入门参考

https://segmentfault.com/a/1190000011853167

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

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

tsconfig.json详解

"compilerOptions"可以被忽略,这时编译器会使用默认值。在这里查看完整编辑项完整的列表。
"extends"继承配置
"include""exclude"属性指定一个文件glob匹配模式列表。(指定编译)
"files"包含指定文件列表。
{  
  "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"
  ]
 
}

 

posted on 2017-11-21 17:31  前路亦是故乡  阅读(266)  评论(0编辑  收藏  举报

导航