Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Type in Aot Build #63

Closed
elvirdolic opened this issue Jul 6, 2017 · 3 comments
Closed

Issue with Type in Aot Build #63

elvirdolic opened this issue Jul 6, 2017 · 3 comments

Comments

@elvirdolic
Copy link

elvirdolic commented Jul 6, 2017

Hello,

Versions:
typescript: 2.4.1
ngrx/store: latest nightly build
angular: 4.2.5

On AOT Build im receiving type errors

Type 'Store<
Customer[]>' is not assignable to type 'Observable<Customer[]>'.
  Types of property 'subscribe' are incompatible.
    Type '{ (): Subscription; (observer: PartialObserver<Readonly<Customer[]>>): Subscription; (next?: (val...' is not assignable to type '{ (): Subscription; (observer: Pa
rtialObserver<Customer[]>): Subscription; (next?: (value: Custom...'.
      Types of parameters 'next' and 'next' are incompatible.
        Types of parameters 'value' and 'value' are incompatible.
          Type 'Readonly<Customer[]>' is not assignable to type 'Customer[]'.

in customers-list.component

customers$: Observable<Customer[]>; 
this.customers$ = this.store.select(customers);

customers selector

export const customers = createSelector(customerState, (state: state) => {
    return state.customers.ids.map(id => state.customers.entities[id]);
});

@agugan
Copy link
Contributor

agugan commented Jul 10, 2017

@elvirdolic #46 Could be due to part explained here.

@jinder
Copy link
Contributor

jinder commented Jul 11, 2017

@elvirdolic @agugan Yes, this is a dupe of #46.

@MikeRyanDev
Copy link
Member

Closes in #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants