“承诺”类型仅指类型,但用作值

时间:2018-02-16 06:46:11

标签: angular typescript jhipster

我已经使用Angular 5创建了一个jhipster项目。该项目在命令行上运行正常但是当将项目导入eclipse时,角度代码中存在一些错误。它主要包含Type promise错误,其他几个错误。

其他一些错误,

属性'endsWith'在类型'string'上不存在。 类型'string'上不存在属性'includes'。 类型'string'上不存在属性'startsWith'。

下面是tsconfig.json,

{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false,
        "skipLibCheck": true,
        "suppressImplicitAnyIndexErrors": true,
        "outDir": "target/www/app",
        "lib": ["es7", "dom"],
        "typeRoots": [
            "node_modules/@types"
        ],
        "baseUrl": "./",
        "paths": {
            "@angular/*": [
                "../node_modules/@angular/*"
            ]
        }
    },
    "include": [
        "src/main/webapp/app",
        "src/test/javascript/"
    ]
}

我正在使用带有角度5支持的Angular IDE 2017 CI的Eclipse Oxygen。

我使用的TypeScript版本是2.5.2。

有人可以帮我解决这个问题吗?

0 个答案:

没有答案