File size: 866 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
---
id: injectMutationState
title: injectMutationState
---
# Function: injectMutationState()
```ts
function injectMutationState<TResult>(
injectMutationStateFn,
options?,
): Signal<TResult[]>
```
Injects a signal that tracks the state of all mutations.
## Type Parameters
• **TResult** = `MutationState`\<`unknown`, `Error`, `unknown`, `unknown`\>
## Parameters
### injectMutationStateFn
() => `MutationStateOptions`\<`TResult`\>
A function that returns mutation state options.
### options?
[`InjectMutationStateOptions`](../../interfaces/injectmutationstateoptions.md)
The Angular injector to use.
## Returns
`Signal`\<`TResult`[]\>
The signal that tracks the state of all mutations.
## Defined in
[inject-mutation-state.ts:64](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/inject-mutation-state.ts#L64)
|