Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

TimeoutCallback.md

29 lines633 Bytes

Type Alias: TimeoutCallback()

type TimeoutCallback = (_) => void;

Defined in: packages/query-core/src/timeoutManager.ts:9

TimeoutManager does not support passing arguments to the callback.

(_: void) is the argument type inferred by TypeScript's default typings for setTimeout(cb, number). If we don't accept a single void argument, then new Promise(resolve => timeoutManager.setTimeout(resolve, N)) is a type error.

Parameters

_

void

Returns

void