MCPcopy Create free account
hub / github.com/ngrx/platform / mapOneMutably

Function mapOneMutably

modules/entity/src/unsorted_state_adapter.ts:197–211  ·  view source on GitHub ↗
({ map, id }: any, state: any)

Source from the content-addressed store, hash-verified

195 function mapOneMutably(map: EntityMapOneNum<T>, state: R): DidMutate;
196 function mapOneMutably(map: EntityMapOneStr<T>, state: R): DidMutate;
197 function mapOneMutably({ map, id }: any, state: any): DidMutate {
198 const entity = state.entities[id];
199 if (!entity) {
200 return DidMutate.None;
201 }
202
203 const updatedEntity = map(entity);
204 return updateOneMutably(
205 {
206 id: id,
207 changes: updatedEntity,
208 },
209 state
210 );
211 }
212
213 function upsertOneMutably(entity: T, state: R): DidMutate;
214 function upsertOneMutably(entity: any, state: any): DidMutate {

Callers

nothing calls this directly

Calls 1

updateOneMutablyFunction · 0.70

Tested by

no test coverage detected