MCPcopy Create free account
hub / github.com/TanStack/query / successState

Function successState

packages/query-core/src/query.ts:739–747  ·  view source on GitHub ↗
(data: TData | undefined, dataUpdatedAt?: number)

Source from the content-addressed store, hash-verified

737}
738
739function successState<TData>(data: TData | undefined, dataUpdatedAt?: number) {
740 return {
741 data,
742 dataUpdatedAt: dataUpdatedAt ?? Date.now(),
743 error: null,
744 isInvalidated: false,
745 status: 'success' as const,
746 }
747}
748
749function getDefaultState<
750 TQueryFnData,

Callers 2

setOptionsMethod · 0.85
reducerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected