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

Function timeUntilStale

packages/query-core/src/utils.ts:108–110  ·  view source on GitHub ↗
(updatedAt: number, staleTime?: number)

Source from the content-addressed store, hash-verified

106}
107
108export function timeUntilStale(updatedAt: number, staleTime?: number): number {
109 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0)
110}
111
112export function resolveQueryValue<
113 TValue,

Callers 2

#updateStaleTimeoutMethod · 0.90
isStaleByTimeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected