You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @ngrx/* package(s) are the source of the bug?
signals
Minimal reproduction of the bug/regression with instructions
A TypeScript error occurs when attempting to use the patchState function with addEntity on a store with withEntities. The error indicates a type mismatch between PartialStateUpdater<NamedEntityState<E, Collection>> and the expected parameter type.
X [ERROR] TS2345: Argument of type 'PartialStateUpdater<NamedEntityState<E, Collection>>' is not assignable to parameter of type 'Partial<{ [
K in keyof { [K in keyof NamedEntityState<E, Collection>]: NamedEntityState<E, Collection>[K]; }]: { [K in keyof NamedEntityState<E, Collection>]: NamedEntityState<...>[K]; }[K]; }> | PartialStateUpdater<...>'.
Type 'PartialStateUpdater<NamedEntityState<E, Collection>>' is not assignable to type 'PartialStateUpdater<{ [K in keyof { [K in keyof Name
dEntityState<E, Collection>]: NamedEntityState<E, Collection>[K]; }]: { [K in keyof NamedEntityState<E, Collection>]: NamedEntityState<...>[K]; }[K]; }>'.
Types of parameters 'state' and 'state' are incompatible.
Type '{ [K in keyof { [K in keyof NamedEntityState<E, Collection>]: NamedEntityState<E, Collection>[K]; }]: { [K in keyof NamedEntityState<E, Collection>]: NamedEntityState<...>[K]; }[K]; }' is not assignable to type 'NamedEntityState<E, Collection>'.
Type 'string' is not assignable to type 'keyof NamedEntityState<E, Collection>'.
Type 'string' is not assignable to type 'keyof NamedEntityState<E, Collection>'.
Type '"entityMap"' is not assignable to type '`${Collection}${Capitalize<K>}` | `${Collection}EntityMap` | `${Collection}Ids`'. [plugin angular-compiler]
TS2322: Type NamedEntityState<User, Collection> is not assignable to type Partial<NamedEntityState<User, Collection>>
Type keyof NamedEntityState<User, Collection> is not assignable to type keyof EntityState<Entity>
Type `${Collection}EntityMap` | `${Collection}Ids` is not assignable to type keyof EntityState<Entity>
Type `${Collection}EntityMap` is not assignable to type keyof EntityState<Entity>
Type `${string}EntityMap` is not assignable to type keyof EntityState<Entity>
Which @ngrx/* package(s) are the source of the bug?
signals
Minimal reproduction of the bug/regression with instructions
A TypeScript error occurs when attempting to use the patchState function with addEntity on a store with
withEntities
. The error indicates a type mismatch between PartialStateUpdater<NamedEntityState<E, Collection>> and the expected parameter type.https://stackblitz.com/edit/vitejs-vite-nuijcczs?file=src%2Fmain.ts
Expected behavior
Collection extends string
generic could be used to make this feature type-safe and allow method naming like inngrx-toolkit withDataService
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
"@ngrx/signals": "^19.0.0",
Other information
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: