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

Function successState

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

Source from the content-addressed store, hash-verified

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

Callers 2

setOptionsMethod · 0.85
reducerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected