pdl 的个人博客

记录精彩的程序人生

Open Source, Open Mind,
Open Sight, Open Future!
  menu
123 文章
0 评论
1275 浏览
0 当前访客
ღゝ◡╹)ノ❤️

umi或react在vscode上使用TypeScript语法报错问题

tsconfig.json里写入下面内容:

{
    "compilerOptions": {
        "outDir": "build/dist",
        "module": "esnext",
        "target": "esnext",
        "lib": [
            "esnext",
            "dom"
        ],
        "sourceMap": true,
        "baseUrl": ".",
        "jsx": "react",
        "allowSyntheticDefaultImports": true,
        "moduleResolution": "node",
        "forceConsistentCasingInFileNames": true,
        "noImplicitReturns": true,
        "suppressImplicitAnyIndexErrors": true,
        "noUnusedLocals": true,
        "allowJs": true,
        "experimentalDecorators": true,
        "strict": true,
        "paths": {
            "@/*": [
                "./src/*"
            ]
        }
    },
    "exclude": [
        "node_modules",
        "build",
        "scripts",
        "acceptance-tests",
        "webpack",
        "jest",
        "src/setupTests.ts",
        "tslint:latest",
        "tslint-config-prettier"
    ]
}


标题:umi或react在vscode上使用TypeScript语法报错问题
作者:pengdongliang
地址:https://www.p0d0.com/articles/2019/09/06/1573740603532.html

评论