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

后端 未结 9 1473
囚心锁ツ
囚心锁ツ 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:47

    I ran into the same problem and found the following website helpful https://www.georgephillipson.com/blog/jquery/setting-up-angular-2-in-visual-studio-2017/ it had step by step instructions on setting up Angular for an MVC website explained how to fix the error that this post is referring to and also a link to GitHub with the full code.

    I found it helpful so thought I would let others know

    As per Zoes post, I have added more to why I think the link may be useful

    The page shows how to update the RxJS to fix error, it also shows how to check if you have Node and NPM installed on your computer and explains how to add TypeScript, it then shows how to set up your cshtml file to display Angular content

提交回复
热议问题