platform icon indicating copy to clipboard operation
platform copied to clipboard

fix(signals): patch state methods do not correctly resolve generic co…

Open ivashikhmin opened this issue 1 year ago • 1 comments

…llection names withEntities

Ensures type-safety of named entity collections with patchState helpers

fixes #4638

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/ngrx/platform/blob/main/CONTRIBUTING.md#commit
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [ ] Documentation has been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #4638

What is the new behavior?

Collection extends string generic could be used to make features with named entity collections (withEntities) and state updaters, e.g. addEntity, in type-safe manner and allow method naming like in ngrx-toolkit withDataService

Does this PR introduce a breaking change?

[ ] Yes
[x] No

ivashikhmin avatar Dec 29 '24 22:12 ivashikhmin

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
Latest commit 4f7181fa56d45ff72755e0f8988ccd3a3628b0a3
Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/6771c83f96dc7b0008fcc8cf

netlify[bot] avatar Dec 29 '24 22:12 netlify[bot]

We'll take a look at this. The typing could be simplified, which we'll tackle in a different PR.

timdeschryver avatar Jun 30 '25 10:06 timdeschryver