MCPcopy Index your code
hub / github.com/angular/examples / updateUnit

Method updateUnit

logistics-manager-app/src/fleet-db.ts:307–314  ·  view source on GitHub ↗
(id: string, update: Partial<FleetUnit>)

Source from the content-addressed store, hash-verified

305 }
306
307 updateUnit(id: string, update: Partial<FleetUnit>): FleetUnit | undefined {
308 const index = this.fleet.findIndex((u) => u.id === id);
309 if (index !== -1) {
310 this.fleet[index] = { ...this.fleet[index], ...update };
311 return this.fleet[index];
312 }
313 return undefined;
314 }
315}
316
317export const fleetDb = new FleetDatabaseService();

Callers 1

updateFleetUnitFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected