(input: TodoInput)
| 37 | }, |
| 38 | |
| 39 | create(input: TodoInput): Todo { |
| 40 | const now = new Date() |
| 41 | const todo: Todo = { |
| 42 | id: generateId(), |
| 43 | text: input.text, |
| 44 | completed: input.completed ?? false, |
| 45 | createdAt: now, |
| 46 | updatedAt: now, |
| 47 | } |
| 48 | todosStore.set(todo.id, todo) |
| 49 | return todo |
| 50 | }, |
| 51 | |
| 52 | update(id: string, updates: TodoUpdate): Todo | null { |
| 53 | const existing = todosStore.get(id) |
nothing calls this directly
no test coverage detected