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

Function isValidTimeout

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

Source from the content-addressed store, hash-verified

102}
103
104export function isValidTimeout(value: unknown): value is number {
105 return typeof value === 'number' && value >= 0 && value !== Infinity
106}
107
108export function timeUntilStale(updatedAt: number, staleTime?: number): number {
109 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0)

Callers 3

#shouldScheduleTimerMethod · 0.90
scheduleGcFunction · 0.90
utils.test.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected