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

ManagedTimerId.md

21 lines568 Bytes

Type Alias: ManagedTimerId

type ManagedTimerId = 
  | number
  | {
  [toPrimitive]: () => number;
};

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

Wrapping setTimeout is awkward from a typing perspective because platform typings may extend the return type of setTimeout. For example, NodeJS typings add NodeJS.Timeout; but a non-default timeoutManager may not be able to return such a type.