MCPcopy Index your code
hub / github.com/TanStack/query / isValidTimeout

Function isValidTimeout

packages/query-core/src/utils.ts:93–95  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

91}
92
93export function isValidTimeout(value: unknown): value is number {
94 return typeof value === 'number' && value >= 0 && value !== Infinity
95}
96
97export function timeUntilStale(updatedAt: number, staleTime?: number): number {
98 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0)

Callers 3

#updateStaleTimeoutMethod · 0.90
scheduleGcFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…