[tslint]報錯解決(二)

  • Parameter 'data' implicitly has an 'any' type.oop

    • (parameter) data: any
    • 解決:
    • datas: any
    • 或者
    • datas: Array<any>
    • 不知道這樣好很差
  • comment must start with a spacethis

    • 解決
"comment-format": [
      false,
      "check-space"
    ]
  • Forbidden 'var' keyword, use 'let' or 'const' insteadspa

    • 解決
    • "no-var-keyword": false
  • Identifier 'ht' is never reassigned; use 'const' instead of 'var'.調試

    • var改爲const
    • (其實均可以先無論tslint,不影響調試)
  • Calls to 'console.log' are not allowed.code

    • 解決
    • "no-console": false
  • Shadowed name: 'data'orm

  • Expected a 'for-of' loop instead of a 'for' loop with this simple iterationci

    • 解決:
    • // for (var i = 0; i < data.length; i++) {
    • for (let d of data) {
  • Element implicitly has an 'any' type because type '{ 雲景: number[]; 松山湖: number[]; }' has no index signature.get

    • 解決
    • 改聲明那裏:const geoCoordMap: any = {
相關文章
相關標籤/搜索