angular-architects / ngrx-toolkit

Various Extensions for the NgRx Signal Store
MIT License
146 stars 22 forks source link

[SUGGESTION] Does EntityId need to be non-nullable? #28

Open ricochetbrown opened 6 months ago

ricochetbrown commented 6 months ago

https://github.com/angular-architects/ngrx-toolkit/blob/92a47ef4b121aa57cd890813f437a4382de41212/libs/ngrx-toolkit/src/lib/with-data-service.ts#L10

On create, it would be better for this to be null so we can do upserts with updateAll. An entityId doesn't exist yet in those cases but we are forced to pass one in.

ricochetbrown commented 6 months ago

We would prefer export type Entity = { id?: EntityId };