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
RxJS 5.4.2 should now work perfectly with TypeScript 2.4.1. Simply upgrade to 5.4.2+ if possible.
npm install --save rxjs@^5.4.2
If not, the below solution should work.
TypeScript 2.4 has a strictness change, and Subject isn't lifting to the correct Observable. The signature really should have been
(operator: Operator) => Observable
This will be fixed in RxJS 6.
Newer versions of RxJS will have this fixed, but as a temporary workaround, you can use the noStrictGenericChecks compiler option.
In tsconfig.json, put it in "compilerOptions" and set it to true.
{
"compilerOptions": {
"noStrictGenericChecks": true
}
}
On the command line it's --noStrictGenericChecks.