UNPKG

@tanstack/angular-query-experimental

Version:

Signals for managing, caching and syncing asynchronous and remote data in Angular

25 lines (24 loc) 1.08 kB
import { Injector, Provider, Signal } from '@angular/core'; /** * The `Injector` in which to create the isRestoring signal. * * If this is not provided, the current injection context will be used instead (via `inject`). */ interface InjectIsRestoringOptions { injector?: Injector; } /** * Injects a signal that tracks whether a restore is currently in progress. {@link injectQuery} and friends also check this internally to avoid race conditions between the restore and initializing queries. * @param options - Options for injectIsRestoring. * @returns signal with boolean that indicates whether a restore is in progress. * @public */ export declare function injectIsRestoring(options?: InjectIsRestoringOptions): Signal<boolean>; /** * Used by TanStack Query Angular persist client plugin to provide the signal that tracks the restore state * @param isRestoring - a readonly signal that returns a boolean * @returns Provider for the `isRestoring` signal * @public */ export declare function provideIsRestoring(isRestoring: Signal<boolean>): Provider; export {};