-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'Subject<T>' incorrectly extends base class 'Observable<T>' with TypeScript 2.4 #2705
Comments
update TS. That's it |
upgrade ts won't help. according to ts webpage, I added --noStrictGenericChecks to suppress the error message. tsc --noStrictGenericChecks |
Got this error WHEN i updated to TS 2.4.2 |
Fixed by updating RxJS to 5.4.2 |
@Argon2000 |
Didn't work for me with typescript 2.4.2 & RxJS 5.4.2 |
@dearfog TypeScript to 2.4.0 |
I've deleted Rxjs node_module folder, and ran again npm install. That made the magic. |
@AndrewMur I don't believe there is a Typescript version 5.4.0, latest version (as of right now) is 2.4.2 - perhaps you got it confused with the latest version of RxJS which is currently 5.4.3? |
@theBull srry for typo & confuse. Yeap I meant downgrade to typescript 2.4.0 |
Anyone installing from a package.json file, try changing your typescript devDependency from: Then delete the |
I am seeing incorrect information's shared in this issue's comment - anyone still experiences compilation issue with LATEST RxJS, please confirm
(check detail at #2726 (comment)) RxJS itself has fixed its own issue of library regarding this type definition issue and remaining failure mostly shoud be those cases listed above. If you're certain library has still failing, please don't hesitate to create new issue with repo have smallest code can reproduce issue. I'm locking this issue itself to avoid further confusions. |
RxJS version:
5.4.1
Code to reproduce:
Save this line this to a TypeScript file (test.ts):
import {Subject} from 'rxjs/Subject';
Then compile:
tsc test.ts
Expected behavior:
No errors
Actual behavior:
Compilation error:
Additional information:
TypeScript version: 2.4.1
TypeScript 2.4 introduced stricter checks for generics (see this blog post)
(Looks like this could be a typo in Observable#lift)
The text was updated successfully, but these errors were encountered: