Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.49k stars 2.1k forks source link

RXJS Error #1492

Closed p3x-robot closed 7 years ago

p3x-robot commented 7 years ago

Ciao! How are you? I have no idea, why I cannot build now. It was working, now I get this error:

ERROR in [at-loader] ./node_modules/rxjs/Subject.d.ts:16:22 
    TS2415: Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
      Type 'Observable<T>' is not assignable to type 'Observable<R>'.
        Type 'T' is not assignable to type 'R'.

ERROR in [at-loader] ./node_modules/rxjs/observable/dom/WebSocketSubject.d.ts:24:22 
    TS2415: Class 'WebSocketSubject<T>' incorrectly extends base class 'AnonymousSubject<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => WebSocketSubject<R>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<T>'.
      Type 'WebSocketSubject<R>' is not assignable to type 'Observable<T>'.
        Types of property 'operator' are incompatible.
          Type 'Operator<any, R>' is not assignable to type 'Operator<any, T>'.
            Type 'R' is not assignable to type 'T'.

Do you know what it understand?

RobAltena commented 7 years ago

See #1487. (if this happened after upgrading Typescript to 2.4.1).

claudiuconstantin commented 7 years ago

It is due to the Typescript 2.4 upgrade, which brings some breaking changes. Some folks suggested upgrading the rxjs package to 6.0.0-alpha.0, but that didn't work for me, unfortunately...

paulpdaniels commented 7 years ago

Wrong repo, RxJS 5 is maintained at https://github.com/ReactiveX/rxjs. There are already several issues tracking this problem there.