遇到= inside<>时出现tsconfig错误

时间:2018-05-07 12:29:53

标签: typescript tsc

当我运行tsc时,我收到以下错误

export type Handler<TEvent = any, TResult = any> = (
                           ~
functions/node_modules/@types/aws-lambda/index.d.ts(600,28): error TS1005: ',' expected.

注意:它显示TEvent =任何代码的错误

这是我的编译器选项

"compilerOptions": {
    "target": "es5",
    "types": [],
    "module": "commonjs",
    "lib": [
        "dom",
        "dom.iterable",
        "scripthost",
        "es2015.promise",
        "es2015",
        "es6",
        "es2016",
        "es7"
    ],
    "watch": true,
    "forceConsistentCasingInFileNames": true,
    "removeComments": true,
    "preserveConstEnums": true,
    "experimentalDecorators": true,
    "newLine": "LF",
    "noFallthroughCasesInSwitch": true,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitUseStrict": true,
    "pretty": true,
    "sourceMap": false
},

错误位于许多导入库的index.d.ts文件中

打字稿版本是2.8.3

0 个答案:

没有答案