import { Injector, Signal } from '@angular/core'; import { MutationFilters } from '@tanstack/query-core'; export interface InjectIsMutatingOptions { /** * The `Injector` in which to create the isMutating 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 mutations that your application currently has `pending` * (useful for app-wide loading indicators). * * @param filters - The {@link MutationFilters} to narrow down the matched mutations. * @param options - Additional configuration * @returns A `Signal` with the number of mutations that your application currently has `pending`. * * @example * ```angular-ts * @Component({ * selector: 'posts-mutating-indicator', * template: ` * @if (isMutatingPosts()) { * Saving posts... * } * `, * }) * export class PostsMutatingIndicator { * // How many mutations matching the posts prefix are in progress? * readonly isMutatingPosts = injectIsMutating({ mutationKey: ['posts'] }) * } * ``` */ export declare function injectIsMutating(filters?: MutationFilters, options?: InjectIsMutatingOptions): Signal;