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

Entity: Update type should be provided from top level import. #670

Closed
sandangel opened this issue Dec 26, 2017 · 3 comments
Closed

Entity: Update type should be provided from top level import. #670

sandangel opened this issue Dec 26, 2017 · 3 comments

Comments

@sandangel
Copy link
Contributor

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[x] Feature request
[ ] Documentation issue or request

What is the current behavior?

Currently Update type for type checking updateMany and updateOne methods of entity adapter is only available in deep import import {Update} from '@ngrx/entity/src/models'

Expected behavior:

It should be provided as top level import

      import {Update} from '@ngrx/entity';

      // ...
      const updates: Update[] = action.payload.map(item => ({id: item.unixTime, changes: item}));
      return {
        ...adapter.updateMany(updates, state),
        loading: false,
        loaded: true,
        errorMess: null,
      };

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

Other information:

@sandangel sandangel changed the title Entity: Update type should be provided from top level imported. Entity: Update type should be provided from top level import. Dec 26, 2017
@brandonroberts
Copy link
Member

Seems reasonable. Care to submit a PR?

@sandangel
Copy link
Contributor Author

sure.

@shhdgit
Copy link

shhdgit commented Jan 3, 2018

I think this #675 should release a version if docs is updated.

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

No branches or pull requests

3 participants