---
id: BaseMutationNarrowing
title: BaseMutationNarrowing
---
Defined in: [packages/angular-query-experimental/src/types.ts:324](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/types.ts#L324)
The `isSuccess`/`isError`/`isPending`/`isIdle` methods on a mutation result. Each is both a `Signal`
(its current boolean value is read reactively without calling it) and a type-guard function you can
call — `if (mutation.isSuccess())` — so that `mutation.data` narrows away `undefined` inside the branch.
## Type Parameters
### TData
`TData` = `unknown`
The type your mutation function resolves to.
### TError
`TError` = [`DefaultError`](../type-aliases/DefaultError.md)
The type of errors your mutation function may throw.
### TVariables
`TVariables` = `unknown`
The type of the variable passed to `mutate`/`mutateAsync`.
### TOnMutateResult
`TOnMutateResult` = `unknown`
The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
their `onMutateResult` parameter — useful for optimistic-update rollback data.
## Properties
| Property | Type | Description |
| ------ | ------ | ------ |
| `isError` | `SignalFunction`\<(`this`: [`CreateMutationResult`](../type-aliases/CreateMutationResult.md)\<`TData`, `TError`, `TVariables`, `TOnMutateResult`\>) => `this is CreateMutationResult, { mutate: CreateMutateFunction }> & { mutateAsync: CreateMutateAsyncFunction }>`\> | Whether the mutation is in the `error` state. Calling it narrows the result to that state. |
| `isIdle` | `SignalFunction`\<(`this`: [`CreateMutationResult`](../type-aliases/CreateMutationResult.md)\<`TData`, `TError`, `TVariables`, `TOnMutateResult`\>) => `this is CreateMutationResult, { mutate: CreateMutateFunction }> & { mutateAsync: CreateMutateAsyncFunction }>`\> | Whether the mutation is in the `idle` state. Calling it narrows the result to that state. |
| `isPending` | `SignalFunction`\<(`this`: [`CreateMutationResult`](../type-aliases/CreateMutationResult.md)\<`TData`, `TError`, `TVariables`, `TOnMutateResult`\>) => `this is CreateMutationResult, { mutate: CreateMutateFunction }> & { mutateAsync: CreateMutateAsyncFunction }>`\> | Whether the mutation is in the `pending` state. Calling it narrows the result to that state. |
| `isSuccess` | `SignalFunction`\<(`this`: [`CreateMutationResult`](../type-aliases/CreateMutationResult.md)\<`TData`, `TError`, `TVariables`, `TOnMutateResult`\>) => `this is CreateMutationResult, { mutate: CreateMutateFunction }> & { mutateAsync: CreateMutateAsyncFunction }>`\> | Whether the mutation is in the `success` state. Calling it narrows the result to that state. |