rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.

Open amar-muratovic opened this issue 8 years ago • 6 comments

Dear all,

besides problems with Opaque Token, this is my second issue when I start my Ionic App. I really don't have any more ideas how to solve this issue.

Complete message:

Class 'Subject' incorrectly extends base class 'Observable'. Types of property 'lift' are incompatible. Type '(operator: Operator<T, R>) => Observable' is not assignable to type '(operator: Operator<T, R>) => Observable'. Type 'Observable' is not assignable to type 'Observable'. Type 'T' is not assignable to type 'R'.

Error:

*/

  | export declare class Subject extends Observable implements ISubscription {   | observers: Observer[];

Enviroment:

Ionic Framework: 3.9.2 Ionic App Scripts: 3.1.8 Angular Core: 5.0.3 Angular Compiler CLI: 5.0.3 Node: 6.10.3 OS Platform: Windows 10 Navigator Platform: Win32 User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

amar-muratovic avatar Jan 31 '18 18:01 amar-muratovic

What version of Rx you are using?

kwonoj avatar Jan 31 '18 18:01 kwonoj

5.5.6 @kwonoj

amar-muratovic avatar Jan 31 '18 18:01 amar-muratovic

5.5.6 includes fixes library side issues regression. Please ensure

  1. if there's any other duplicated dep have lower version
  2. if there's extending / subclassing on user code

if both are not the case, it'd appreciate to provide reproducible repo, without ng / or ionic to isolate from library side behavior.

kwonoj avatar Jan 31 '18 18:01 kwonoj

Save this line this to a TypeScript file (test.ts): import {Subject} from 'rxjs/Subject';

this solved my problem in angular2

ramakanthreddyk avatar Feb 14 '18 17:02 ramakanthreddyk

I'm closing this issue as lacks of detail to investigate more. Please feel freely reopen / create new issue with suggested steps in https://github.com/ReactiveX/rxjs/issues/3281#issuecomment-362032012 .

kwonoj avatar Feb 21 '18 16:02 kwonoj

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jun 06 '18 00:06 lock[bot]