# BaseQueryNarrowing

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

Defined in: [packages/angular-query/src/types.ts:85](https://github.com/TanStack/query/blob/main/packages/angular-query/src/types.ts#L85)

Signal-backed guards that narrow a query result and its data and error fields by status: the
`isSuccess`/`isError`/`isPending` methods on a query result. Unlike `react-query`'s derived booleans, each
is a `Signal` you call to read its current boolean value reactively, and the call is also a type guard —
`if (query.isSuccess())` — so that `query.data` narrows away `undefined` inside the branch, the same way
`status` narrowing works on the plain object `react-query` returns.

## Type Parameters

### TData

`TData` = `unknown`

The type `data` ends up as after `select` runs.

### TError

`TError` = [`DefaultError`](../type-aliases/DefaultError.md)

The type of errors your `queryFn` may throw.

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="property-iserror"></a> `isError` | `SignalFunction`\<() => `this is CreateBaseQueryResult<TData, TError, CreateStatusBasedQueryResult<"error", TData, TError>>`\> | Returns whether the result failed and narrows its data and error signals. |
| <a id="property-ispending"></a> `isPending` | `SignalFunction`\<() => `this is CreateBaseQueryResult<TData, TError, CreateStatusBasedQueryResult<"pending", TData, TError>>`\> | Narrows the result to the pending state when that state is possible. |
| <a id="property-issuccess"></a> `isSuccess` | `SignalFunction`\<() => `this is CreateBaseQueryResult<TData, TError, CreateStatusBasedQueryResult<"success", TData, TError>>`\> | Returns whether the result is successful and narrows its data and error signals. |
