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

Function successState

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

Source from the content-addressed store, hash-verified

926}
927
928function successState<TData>(data: TData | undefined, dataUpdatedAt?: number) {
929 return {
930 data,
931 dataUpdatedAt: dataUpdatedAt ?? Date.now(),
932 error: null,
933 isInvalidated: false,
934 status: 'success' as const,
935 }
936}
937
938function getDefaultState<
939 TQueryFnData,

Callers 2

setOptionsMethod · 0.85
reducerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected