rxjs/Subject.d.ts error : Class 'Subject' incorrectly extends base class 'Observable'

前端 未结 19 2188
一向
一向 2020-12-01 09:55

I extracted sample template code from this tutorial and did below two steps to get started -

  1. npm install // worked fine and created node_modules folder
19条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 10:28

    You can temporarily use the --noStrictGenericChecks flag to get around this in TypeScript 2.4.

    This is --noStrictGenericChecks on the command line, or just "noStrictGenericChecks": true in the "compilerOptions" field in tsconfig.json.

    Keep in mind, RxJS 6 will have this corrected.

    See this similar question: How do I get around this error in RxJS 5.x in TypeScript 2.4?

提交回复
热议问题