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

Function getIsRestoringContext

packages/svelte-query/src/context.ts:27–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26/** Retrieves a `isRestoring` from Svelte's context */
27export const getIsRestoringContext = (): Box<boolean> => {
28 try {
29 const isRestoring = getContext<Box<boolean> | undefined>(
30 _isRestoringContextKey,
31 )
32 return isRestoring ?? { current: false }
33 } catch (error) {
34 return { current: false }
35 }
36}
37
38/** Sets a `isRestoring` on Svelte's context */
39export const setIsRestoringContext = (isRestoring: Box<boolean>): void => {

Callers 2

useIsRestoringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected