Function
update
(id: string, updates: TodoUpdate)
Source from the content-addressed store, hash-verified
| 50 | }, |
| 51 | |
| 52 | update(id: string, updates: TodoUpdate): Todo | null { |
| 53 | const existing = todosStore.get(id) |
| 54 | if (!existing) { |
| 55 | return null |
| 56 | } |
| 57 | |
| 58 | const updated: Todo = { |
| 59 | ...existing, |
| 60 | ...updates, |
| 61 | updatedAt: new Date(), |
| 62 | } |
| 63 | todosStore.set(id, updated) |
| 64 | return updated |
| 65 | }, |
| 66 | |
| 67 | delete(id: string): boolean { |
| 68 | return todosStore.delete(id) |
Callers
nothing calls this directly
Tested by
no test coverage detected