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

Function parseTodo

examples/react-native/offline-transactions/src/utils/api.ts:30–36  ·  view source on GitHub ↗
(todo: TodoResponse)

Source from the content-addressed store, hash-verified

28
29// Convert API response to Todo with Date objects
30function parseTodo(todo: TodoResponse): Todo {
31 return {
32 ...todo,
33 createdAt: new Date(todo.createdAt),
34 updatedAt: new Date(todo.updatedAt),
35 }
36}
37
38// API client that calls the shared backend server
39export const todoApi = {

Callers 2

createFunction · 0.85
updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected