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

Function canFetch

packages/query-core/src/retryer.ts:53–57  ·  view source on GitHub ↗
(networkMode: NetworkMode | undefined)

Source from the content-addressed store, hash-verified

51}
52
53export function canFetch(networkMode: NetworkMode | undefined): boolean {
54 return (networkMode ?? 'online') === 'online'
55 ? onlineManager.isOnline()
56 : true
57}
58
59export class CancelledError extends Error {
60 revert?: boolean

Callers 2

fetchStateFunction · 0.90
canStartFunction · 0.85

Calls 1

isOnlineMethod · 0.80

Tested by

no test coverage detected