Platform: ChangeItemSetFactory Update does not allow entities with Number IDs

Created on 2 Jul 2019  路  1Comment  路  Source: ngrx/platform

Minimal reproduction of the bug/regression with instructions:

https://stackblitz.com/edit/ngrx-seed-data-update-bug

See the type error in the example() function, compared with an entity with a String ID

Expected behavior:

ChangeSetItemFactory.update should allow for updating entities with a Number type ID

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):

NgRx: 8.0.1
Angular: 8.0.2
Node: 10.15.3

Other information:

Although they type Update<T> allows for UpdateStr<T> | UpdateNum<T>, the update function forces T to extend {id: string} only

I would be willing to submit a PR to fix this issue

[X] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

Data bug

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NathanWalker picture NathanWalker  路  3Comments

ghost picture ghost  路  3Comments

Matmo10 picture Matmo10  路  3Comments

shyamal890 picture shyamal890  路  3Comments

gperdomor picture gperdomor  路  3Comments