MCPcopy Create free account
hub / github.com/TanStack/db / updateTodo

Function updateTodo

packages/query-db-collection/tests/query.test.ts:2613–2620  ·  view source on GitHub ↗
(id: string, changes: Partial<Todo>)

Source from the content-addressed store, hash-verified

2611 .mockImplementation(() => Promise.resolve([...serverTodos]))
2612
2613 async function updateTodo(id: string, changes: Partial<Todo>) {
2614 await new Promise((resolve) => setTimeout(resolve, 10))
2615 const todo = serverTodos.find((t) => t.id === id)
2616 if (todo) {
2617 Object.assign(todo, changes)
2618 }
2619 return todo
2620 }
2621
2622 const todosCollection = createCollection(
2623 queryCollectionOptions<Todo>({

Callers 1

query.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected