Vue + TypeScript 重構 vue-admin-element 小結

{javascript

// 編譯選項
"compilerOptions": {
  // 輸出目錄
  "outDir": "./output",
  // 是否包含能夠用於 debug 的 sourceMap
  "sourceMap": true,
  // 以嚴格模式解析
  "strict": true,
  // 採用的模塊系統
  "module": "esnext",
  // 如何處理模塊
  "moduleResolution": "node",
  // 編譯輸出目標 ES 版本
  "target": "es5",
  // 容許從沒有設置默認導出的模塊中默認導入
  "allowSyntheticDefaultImports": true,
  // 將每一個文件做爲單獨的模塊
  "isolatedModules": false,
  // 啓用裝飾器
  "experimentalDecorators": true,
  // 啓用設計類型元數據(用於反射)
  "emitDecoratorMetadata": true,
  // 在表達式和聲明上有隱含的any類型時報錯
  "noImplicitAny": false,
  // 不是函數的全部返回路徑都有返回值時報錯。
  "noImplicitReturns": true,
  // 從 tslib 導入外部幫助庫: 好比__extends,__rest等
  "importHelpers": true,
  // 編譯過程當中打印文件名
  "listFiles": true,
  // 移除註釋
  "removeComments": true,
  "suppressImplicitAnyIndexErrors": true,
  // 容許編譯javascript文件
  "allowJs": true,
  // 解析非相對模塊名的基準目錄
  "baseUrl": "./",
  // 指定特殊模塊的路徑
  "paths": {
    "jquery": [
      "node_modules/jquery/dist/jquery"
    ]
  },
  // 編譯過程當中須要引入的庫文件的列表
  "lib": [
    "dom",
    "es2015",
    "es2015.promise"
  ]
}

}java

相關文章
相關標籤/搜索