I am getting this error about Property 'lift'
and in the subject.d.ts file and not sure how to correct it. I am using this version rxjs: "5.0.1"
,
Severity Code Description File Project Line Suppression State Error TS2416 (TS) Property 'lift' in type 'Subject' is not assignable to the same property in base type 'Observable'. 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'. 'R' could be instantiated with an arbitrary type which could be unrelated to 'T'. C:\WebProjects\COTT\COTT\OrderTemplateTool.Web\node_modules\rxjs\Subject.d.ts
/**
* @class Subject<T>
*/
export declare class Subject<T> extends Observable<T> implements ISubscription {
observers: Observer<T>[];
closed: boolean;
isStopped: boolean;
hasError: boolean;
thrownError: any;
constructor();
static create: Function;
lift<R>(operator: Operator<T, R>): Observable<T>;
next(value?: T): void;
error(err: any): void;
complete(): void;
unsubscribe(): void;
protected _subscribe(subscriber: Subscriber<T>): Subscription;
asObservable(): Observable<T>;
}
CodePudding user response:
The signature in the RxJS's typings was incorrect and got fixed in v5.4.2: https://github.com/ReactiveX/rxjs/pull/2722/files.
The solution is therefore to update to [email protected]
.