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

Function functionalUpdate

packages/query-core/src/utils.ts:84–91  ·  view source on GitHub ↗
(
  updater: Updater<TInput, TOutput>,
  input: TInput,
)

Source from the content-addressed store, hash-verified

82export function noop() {}
83
84export function functionalUpdate<TInput, TOutput>(
85 updater: Updater<TInput, TOutput>,
86 input: TInput,
87): TOutput {
88 return typeof updater === 'function'
89 ? (updater as (_: TInput) => TOutput)(input)
90 : updater
91}
92
93export function isValidTimeout(value: unknown): value is number {
94 return typeof value === 'number' && value >= 0 && value !== Infinity

Callers 1

setQueryDataMethod · 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…