后续的属性声明必须具有相同的类型。属性'toBeFalse'必须为'()=> boolean'类型,但此处的类型为'ToBeFalse'

时间:2019-12-20 09:00:08

标签: angular

升级到Angular 9后,我在jasminejasmine-expect中遇到构建错误:

ERROR in ../node_modules/jasmine-expect/dist/toBeFalse.d.ts:5:13 - error TS2717: Subsequent property declarations must have the same type.  Property 'toBeFalse' must be of type '() => boolean', but here has type 'ToBeFalse'.

5             toBeFalse: ToBeFalse;
              ~~~~~~~~~

请在此处查看我的tsconfig.spec.json

{
    "extends": "../tsconfig.json",
    "compilerOptions": {
        "strictNullChecks": false,
        "outDir": "../out-tsc/spec",
        "baseUrl": "./",
        "target": "es5",
        "types": ["jasmine", "node"]
    },
    "files": ["test.ts", "polyfills.ts"],
    "include": ["**/*.spec.ts", "**/*.d.ts"]
}

我的ng --version如下:

    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.0.0-rc.6
Node: 12.7.0
OS: win32 x64

Angular: 9.0.0-rc.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.6
@angular-devkit/build-angular     0.900.0-rc.6
@angular-devkit/build-optimizer   0.900.0-rc.6
@angular-devkit/build-webpack     0.900.0-rc.6
@angular-devkit/core              9.0.0-rc.6
@angular-devkit/schematics        9.0.0-rc.6
@angular/cdk                      9.0.0-rc.5
@angular/cli                      9.0.0-rc.6
@angular/http                     7.2.15
@ngtools/webpack                  9.0.0-rc.6
@schematics/angular               9.0.0-rc.6
@schematics/update                0.900.0-rc.6
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

我潜入了多个线程,但没有找到任何解决方案。 有人可以帮忙吗?

0 个答案:

没有答案