UNPKG

@tanstack/angular-query-experimental

Version:

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

22 lines (21 loc) 829 B
import { Injector, Signal } from '@angular/core'; import { QueryFilters } from '@tanstack/query-core'; export interface InjectIsFetchingOptions { /** * The `Injector` in which to create the isFetching signal. * * If this is not provided, the current injection context will be used instead (via `inject`). */ injector?: Injector; } /** * Injects a signal that tracks the number of queries that your application is loading or * fetching in the background. * * Can be used for app-wide loading indicators * @param filters - The filters to apply to the query. * @param options - Additional configuration * @returns signal with number of loading or fetching queries. * @public */ export declare function injectIsFetching(filters?: QueryFilters, options?: InjectIsFetchingOptions): Signal<number>;