ngrx / store

RxJS powered state management for Angular applications, inspired by Redux
MIT License
3.9k stars 311 forks source link

Problem with assigment after fix in RxJS #437

Closed galuszkak closed 7 years ago

galuszkak commented 7 years ago

I've tested fix for RxJS with TypeScript 2.4.1, but it now generate issue in ngrx.

I have code like that:

this.discount$ = this.store.select(getDiscount);

and get an error:

Type 'Observable<Discount>' is not assignable to type 'Observable<Discount>'. Two different types with this name exist, but they are unrelated.
Property 'source' is protected but type 'Observable<T>' is not a class derived from 'Observable<T>'.

For me they are the same, so this is somehow related to ngrx (or maybe reselect which I'm using also).

jeffwhelpley commented 7 years ago

I have this issue as well. It appears that TypeScript 2.4 is much more stringent about Map based types. RxJS just published an update to deal with this issue. So, ngrx needs to update to the latest TypeScript and RxJS.

brandonroberts commented 7 years ago

Are you using TS 2.4.1 and RxJS 5.4.2?

jeffwhelpley commented 7 years ago

@brandonroberts Sorry! Upon further reflection, it looks like my error is related to this issue:

https://github.com/ngrx/effects/issues/165

galuszkak commented 7 years ago

@brandonroberts Yes. TS 4.2.1 and RxJS 5.4.2

brandonroberts commented 7 years ago

Closed via #439 and published as 2.2.3