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

Function isValidTimeout

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

Source from the content-addressed store, hash-verified

144 * @returns `true` if `value` is a number that is `>= 0` and not `Infinity`.
145 */
146export function isValidTimeout(value: unknown): value is number {
147 return typeof value === 'number' && value >= 0 && value !== Infinity
148}
149
150/**
151 * Calculates how long until data updated at `updatedAt` becomes stale.

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected