Platform: [Type Error] Nightly build for @ngrx/store

Created on 14 Jun 2017  路  9Comments  路  Source: ngrx/platform

The compiler is throwing an error due to wrong typings for @ngrx/store nightly builds.

This is the error message:

Class 'Observable<Readonly<T>>' defines instance member property 'select', but extended class 'Store<T>' defines it as instance member function

I'm using RxJs v5.4.0.

Most helpful comment

@dancancro and @cyr-x Make sure you guys have deleted the @ngrx/core from your node_modules and clean up any of your code that may have made calls to it

All 9 comments

Typescript version?

I'm using typescript version 2.3.4

@cyr-x Have you solved this yet?

I'm getting this in my project too. I'm using typescript 2.3.4

With rxjs 5.4.2:

ERROR in [at-loader] ./node_modules/@ngrx/store/src/store.d.ts:13:5
    TS2425: Class 'Observable<Readonly<T>>' defines instance member property 'select', 
but extended class 'Store<T>' defines it as instance member function.

With rxjs 5.0.0-beta.6, I get the above error plus several new ones like this:

ERROR in [at-loader] ./src/main/webapp/app/core/store/id/id.functions.ts:62:5
    TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<Action>'.

@dancancro and @cyr-x Make sure you guys have deleted the @ngrx/core from your node_modules and clean up any of your code that may have made calls to it

Closed with #72

Getting this error:Class 'Observable<T>' defines instance member property 'select', but extended class 'Store<T>' defines it as instance member function. Any idea?

@gentlejoseph I am getting the same error - were you able to resolve it? Thanks

@gentlejoseph @sandraandonov88 npm uninstall @ngrx/core or yarn remove @ngrx/core

Removing @ngrx/core from my module fixed the issue. Using Angular4 with
"@ngrx/effects": "^4.1.1",
"@ngrx/store": "^4.1.1",

This problem came when I am trying to use single store with multi child state, using InjectionToken. With single store and state no problem was found.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NathanWalker picture NathanWalker  路  3Comments

hccampos picture hccampos  路  3Comments

gperdomor picture gperdomor  路  3Comments

shyamal890 picture shyamal890  路  3Comments

mappedinn picture mappedinn  路  3Comments