How do I get around this “Subject incorrectly extends Observable” error in TypeScript 2.4 and RxJS 5.x?

后端 未结 9 1484
囚心锁ツ
囚心锁ツ 2020-12-05 06:33

When I compile, I get the following compiler error in the RxJS declaration files:

node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class \'Subject

        
9条回答
  •  佛祖请我去吃肉
    2020-12-05 06:52

    In tsconfig.json, put it in "compilerOptions" and set it to true.

    {
        "compilerOptions": true,
        "compilerOptions": {
            "noStrictGenericChecks": true
        }
    }
    

提交回复
热议问题